blob: 9344bbf80d83b1165b72354052c4068f9e270396 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
--- src/FbTk/ImagePNG.cc 2016-01-05 17:44:13.388526063 +0100
+++ src/FbTk/ImagePNG.cc 2016-01-05 17:46:53.495286319 +0100
@@ -102,7 +102,7 @@
return 0;
}
- if (setjmp(png.png()->jmpbuf)) {
+ if (setjmp(png_jmpbuf(png.png()))) {
fclose(fp);
return 0;
}
@@ -264,9 +264,9 @@
long i = 0x44332211;
unsigned char* a = (unsigned char*) &i;
bool big_endian = (*a != 0x11);
- int alphacolor = ((png.info()->channels != 4) ? 0xFF000000 : 0);
+ int alphacolor = ((png_get_channels(png.png(),png.info()) != 4) ? 0xFF000000 : 0);
if (big_endian) {
- int shift = ((png.info()->channels == 4) ? 0 : 8);
+ int shift = ((png_get_channels(png.png(),png.info()) == 4) ? 0 : 8);
alphacolor = (0xFF >> shift);
}
screen_surf.setColorKey(alphacolor, true);
|