From d3cddf3ccdc8a02157971822abeed65eec851346 Mon Sep 17 00:00:00 2001 From: kamel5 Date: Mon, 5 Jul 2021 15:19:58 +0200 Subject: unsigned int is enough In these cases we do not need a "long unsigned int" --- imagemagickwrapper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'imagemagickwrapper.c') diff --git a/imagemagickwrapper.c b/imagemagickwrapper.c index 6f14ba4..ac10fba 100644 --- a/imagemagickwrapper.c +++ b/imagemagickwrapper.c @@ -139,7 +139,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; - long unsigned int opacity = (maxw / width * x + maxh - maxh / height * y) / 2; + unsigned int opacity = (maxw / width * x + maxh - maxh / height * y) / 2; pixel->opacity = (opacity <= MaxRGB) ? opacity : MaxRGB; } } -- cgit v1.2.3