|
Lines 159-165
Link Here
|
| 159 |
image.setColor( i, qRgba(c,c,c,0xff) ); |
159 |
image.setColor( i, qRgba(c,c,c,0xff) ); |
| 160 |
} |
160 |
} |
| 161 |
if ( png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) ) { |
161 |
if ( png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) ) { |
| 162 |
const int g = info_ptr->trans_values.gray; |
162 |
const int g = info_ptr->trans_color.gray; |
| 163 |
if (g < ncols) { |
163 |
if (g < ncols) { |
| 164 |
image.setAlphaBuffer(TRUE); |
164 |
image.setAlphaBuffer(TRUE); |
| 165 |
image.setColor(g, image.color(g) & RGB_MASK); |
165 |
image.setColor(g, image.color(g) & RGB_MASK); |
|
Lines 187-193
Link Here
|
| 187 |
info_ptr->palette[i].red, |
187 |
info_ptr->palette[i].red, |
| 188 |
info_ptr->palette[i].green, |
188 |
info_ptr->palette[i].green, |
| 189 |
info_ptr->palette[i].blue, |
189 |
info_ptr->palette[i].blue, |
| 190 |
info_ptr->trans[i] |
190 |
info_ptr->trans_alpha[i] |
| 191 |
) |
191 |
) |
| 192 |
); |
192 |
); |
| 193 |
i++; |
193 |
i++; |
|
Lines 321-329
Link Here
|
| 321 |
png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) |
321 |
png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) |
| 322 |
if (image.depth()==32 && png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) { |
322 |
if (image.depth()==32 && png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) { |
| 323 |
QRgb trans = 0xFF000000 | qRgb( |
323 |
QRgb trans = 0xFF000000 | qRgb( |
| 324 |
(info_ptr->trans_values.red << 8 >> bit_depth)&0xff, |
324 |
(info_ptr->trans_color.red << 8 >> bit_depth)&0xff, |
| 325 |
(info_ptr->trans_values.green << 8 >> bit_depth)&0xff, |
325 |
(info_ptr->trans_color.green << 8 >> bit_depth)&0xff, |
| 326 |
(info_ptr->trans_values.blue << 8 >> bit_depth)&0xff); |
326 |
(info_ptr->trans_color.blue << 8 >> bit_depth)&0xff); |
| 327 |
for (uint y=0; y<height; y++) { |
327 |
for (uint y=0; y<height; y++) { |
| 328 |
for (uint x=0; x<info_ptr->width; x++) { |
328 |
for (uint x=0; x<info_ptr->width; x++) { |
| 329 |
if (((uint**)jt)[y][x] == trans) { |
329 |
if (((uint**)jt)[y][x] == trans) { |