summaryrefslogtreecommitdiff
path: root/common/im_png.cpp
diff options
context:
space:
mode:
authorleo1999-12-18 18:02:33 +0000
committerleo1999-12-18 18:02:33 +0000
commit03d1428a293c9abdddfed2d5faa1984901932384 (patch)
tree00199b68073d52ffaef9fd8c51911cac57224a96 /common/im_png.cpp
parent7182eed5eb607a2cdd6d8aaae4e893044339cbe1 (diff)
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
Diffstat (limited to 'common/im_png.cpp')
-rwxr-xr-xcommon/im_png.cpp8
1 files changed, 5 insertions, 3 deletions
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))