Lines 128-134
static unsigned char *ReadPng (FILE *pfF
Link Here
|
128 |
png_byte **ppbRowPointers; |
128 |
png_byte **ppbRowPointers; |
129 |
unsigned char *pixels; |
129 |
unsigned char *pixels; |
130 |
unsigned int i, j, passes; |
130 |
unsigned int i, j, passes; |
131 |
unsigned long lw, lh; |
131 |
png_uint_32 lw, lh; |
132 |
int iBitDepth, iColorType; |
132 |
int iBitDepth, iColorType; |
133 |
double dGamma; |
133 |
double dGamma; |
134 |
|
134 |
|
Lines 175-181
static unsigned char *ReadPng (FILE *pfF
Link Here
|
175 |
png_set_palette_to_rgb (png_ptr); |
175 |
png_set_palette_to_rgb (png_ptr); |
176 |
/* 8 bits / channel is needed */ |
176 |
/* 8 bits / channel is needed */ |
177 |
if (iColorType == PNG_COLOR_TYPE_GRAY && iBitDepth < 8) |
177 |
if (iColorType == PNG_COLOR_TYPE_GRAY && iBitDepth < 8) |
178 |
png_set_gray_1_2_4_to_8(png_ptr); |
178 |
png_set_expand_gray_1_2_4_to_8(png_ptr); |
179 |
/* all transparency type : 1 color, indexed => alpha channel*/ |
179 |
/* all transparency type : 1 color, indexed => alpha channel*/ |
180 |
if (png_get_valid (png_ptr, info_ptr,PNG_INFO_tRNS)) |
180 |
if (png_get_valid (png_ptr, info_ptr,PNG_INFO_tRNS)) |
181 |
png_set_tRNS_to_alpha (png_ptr); |
181 |
png_set_tRNS_to_alpha (png_ptr); |