diff options
Diffstat (limited to 'imagemagickwrapper.c')
-rw-r--r-- | imagemagickwrapper.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/imagemagickwrapper.c b/imagemagickwrapper.c index 49fa221..782a9a9 100644 --- a/imagemagickwrapper.c +++ b/imagemagickwrapper.c @@ -140,7 +140,7 @@ void cImageMagickWrapper::CreateGradient(tColor back, tColor blend, int width, i for (int x = 0; x < width; x++) { for (int y = 0; y < height; y++) { PixelPacket *pixel = pixels + y * width + x; - int opacity = (maxw / width * x + maxh - maxh / height * y) / 2; + long unsigned int opacity = (maxw / width * x + maxh - maxh / height * y) / 2; pixel->opacity = (opacity <= MaxRGB) ? opacity : MaxRGB; } } |