From 7e91df967dbca3fde9697ac4f53f70d498f9e371 Mon Sep 17 00:00:00 2001 From: bball Date: Thu, 29 Jan 2009 11:04:43 -0800 Subject: - Added (int) casts for compile time error. --- yaepghd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yaepghd.c b/yaepghd.c index 6303023..c0e2f96 100644 --- a/yaepghd.c +++ b/yaepghd.c @@ -562,9 +562,9 @@ cYaepgTheme::LoadImage(char *Filename) const Magick::PixelPacket *pix = images[0].getConstPixels(0, 0, w, h); for (int iy = 0; iy < h; ++iy) { for (int ix = 0; ix < w; ++ix) { - tColor col = (~(pix->opacity * 255 / MaxRGB) << 24) | - ((pix->red * 255 / MaxRGB) << 16) | - ((pix->green * 255 / MaxRGB) << 8) | + tColor col = (~(int)(pix->opacity * 255 / MaxRGB) << 24) | + ((int)(pix->red * 255 / MaxRGB) << 16) | + ((int)(pix->green * 255 / MaxRGB) << 8) | (pix->blue * 255 / MaxRGB); bmp->DrawPixel(ix, iy, col); ++pix; -- cgit v1.2.3