diff --git a/frameworks/innerkitsimpl/common/src/pixel_astc.cpp b/frameworks/innerkitsimpl/common/src/pixel_astc.cpp index 3a752cc185ff3de29d8bebe002cde9f67c151ba3..329e52028bb049289079b0972697b63ce56ae410 100644 --- a/frameworks/innerkitsimpl/common/src/pixel_astc.cpp +++ b/frameworks/innerkitsimpl/common/src/pixel_astc.cpp @@ -80,8 +80,8 @@ void PixelAstc::scale(float xAxis, float yAxis) SetTransformData(transformData); ImageInfo imageInfo; GetImageInfo(imageInfo); - imageInfo.size.width *= abs(xAxis); - imageInfo.size.height *= abs(yAxis); + imageInfo.size.width = static_cast(round(imageInfo.size.width * abs(xAxis))); + imageInfo.size.height = static_cast(round(imageInfo.size.height * abs(yAxis))); SetImageInfo(imageInfo, true); } }