From 03d1428a293c9abdddfed2d5faa1984901932384 Mon Sep 17 00:00:00 2001 From: leo Date: Sat, 18 Dec 1999 18:02:33 +0000 Subject: Changed warning level to -Wall under Linux and Level 4 for Windows git-svn-id: http://svn.leocad.org/trunk@37 c7d43263-9d01-0410-8a33-9dba5d9f93d6 --- common/im_png.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'common/im_png.cpp') diff --git a/common/im_png.cpp b/common/im_png.cpp index 155afff..1fc3512 100755 --- a/common/im_png.cpp +++ b/common/im_png.cpp @@ -4,9 +4,9 @@ #include "typedefs.h" #define alpha_composite(composite, fg, alpha, bg) { \ - unsigned short temp = ((unsigned short)(fg)*(unsigned short)(alpha) + \ - (unsigned short)(bg)*(unsigned short)(255 - (unsigned short)(alpha)) + (unsigned short)128); \ - (composite) = (unsigned char)((temp + (temp >> 8)) >> 8); \ + unsigned short temp = ((unsigned short)(fg)*(unsigned short)(alpha) + \ + (unsigned short)(bg)*(unsigned short)(255 - (unsigned short)(alpha)) + (unsigned short)128); \ + (composite) = (unsigned char)((temp + (temp >> 8)) >> 8); \ } // ======================================================== @@ -104,6 +104,8 @@ LC_IMAGE* OpenPNG(char* filename) blue = (unsigned char)pBackground->blue; } } + else + red = green = blue = 0; // decode the image, all at once if (setjmp(png_ptr->jmpbuf)) -- cgit v1.2.3