diff --git a/src/core/effects/qgsimageoperation.cpp b/src/core/effects/qgsimageoperation.cpp index c5b8b6ce0ae..97789794202 100644 --- a/src/core/effects/qgsimageoperation.cpp +++ b/src/core/effects/qgsimageoperation.cpp @@ -771,7 +771,7 @@ inline QRgb QgsImageOperation::GaussianBlurOperation::gaussianBlurVertical( cons for ( int i = 0; i <= mRadius * 2; ++i ) { y = std::clamp( posy + ( i - mRadius ), 0, height - 1 ); - ref = sourceFirstLine + sourceBpl * y; + ref = sourceFirstLine + static_cast< std::size_t >( sourceBpl ) * y; QRgb *refRgb = reinterpret_cast< QRgb * >( ref ); r += mKernel[i] * qRed( *refRgb ); diff --git a/src/core/effects/qgsimageoperation.h b/src/core/effects/qgsimageoperation.h index 49de42737d0..a4d6a6ded56 100644 --- a/src/core/effects/qgsimageoperation.h +++ b/src/core/effects/qgsimageoperation.h @@ -445,7 +445,7 @@ class CORE_EXPORT QgsImageOperation int increment = ( mDirection == QgsImageOperation::ByRow ) ? 4 : bytesPerLine; if ( !mForwardDirection ) { - p += ( lineLength - 1 ) * increment; + p += static_cast< std::size_t >( lineLength - 1 ) * increment; increment = -increment; }