| src/PImageLoaderPng.cc | |
| 105 | @@ -105,16 +105,16 @@ |
| 105 | if (color_type == PNG_COLOR_TYPE_PALETTE) { |
| 106 | png_set_palette_to_rgb(png_ptr); |
| 107 | } |
| 108 | |
| 109 | |
| 110 | // gray -> 8 bit gray |
| 111 | if (color_type == PNG_COLOR_TYPE_GRAY && (bpp < 8)) { |
| 112 | png_set_gray_1_2_4_to_8(png_ptr); |
| 113 | png_set_expand_gray_1_2_4_to_8(png_ptr); |
| 114 | } |
| 115 | |
| 116 | if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) { |
| 117 | png_set_tRNS_to_alpha(png_ptr); |
| 118 | } |
| 119 | |
| 120 | |
| 121 | if (bpp == 16) { |
| 122 | png_set_strip_16(png_ptr); |
| 123 | } |
| ... | |
| 179 | @@ -179,7 +179,7 @@ |
| 179 | |
| 180 | status = fread(sig, 1, PImageLoaderPng::PNG_SIG_BYTES, fp); |
| 181 | if (status == PImageLoaderPng::PNG_SIG_BYTES) { |
| 182 | return (png_check_sig(sig, PImageLoaderPng::PNG_SIG_BYTES) != 0); |
| 183 | return (png_sig_cmp(sig,0,PImageLoaderPng::PNG_SIG_BYTES) == 0); |
| 184 | } |
| 185 | return false; |
| 186 | } |
| ... | |