diff --git a/frameworks/innerkitsimpl/common/src/pixel_map.cpp b/frameworks/innerkitsimpl/common/src/pixel_map.cpp index 40a021c359c7bbc37032da358adc175b77dddaee..354f0ec09db0bda32011a4e091f8b67634f434ac 100644 --- a/frameworks/innerkitsimpl/common/src/pixel_map.cpp +++ b/frameworks/innerkitsimpl/common/src/pixel_map.cpp @@ -807,7 +807,7 @@ void PixelMap::UpdatePixelsAlpha(const AlphaType &alphaType, const PixelFormat & alphaIndex = 0; } if (alphaIndex != -1) { - uint8_t pixelBytes = dstPixelMap.GetPixelBytes(); + uint32_t pixelBytes = static_cast(dstPixelMap.GetPixelBytes()); int32_t bufferSize = dstPixelMap.GetByteCount(); if (bufferSize <= 0) { IMAGE_LOGE("UpdatePixelsAlpha invalid byte count: %{public}d", bufferSize);