diff options
-rw-r--r-- | core/io/image.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/io/image.cpp b/core/io/image.cpp index c70f4b86bd..b82e6637b4 100644 --- a/core/io/image.cpp +++ b/core/io/image.cpp @@ -797,7 +797,7 @@ static void _scale_bilinear(const uint8_t *__restrict p_src, uint8_t *__restrict uint32_t interp_down = p01 + (((p11 - p01) * src_xofs_frac) >> FRAC_BITS); uint32_t interp = interp_up + (((interp_down - interp_up) * src_yofs_frac) >> FRAC_BITS); interp >>= FRAC_BITS; - p_dst[i * p_dst_width * CC + j * CC + l] = interp; + p_dst[i * p_dst_width * CC + j * CC + l] = uint8_t(interp); } else if (sizeof(T) == 2) { //half float float xofs_frac = float(src_xofs_frac) / (1 << FRAC_BITS); |