diff --git a/modules/libpr0n/decoders/png/nsPNGDecoder.cpp b/modules/libpr0n/decoders/png/nsPNGDecoder.cpp index e638ebced06..9cf6762d923 100644 --- a/modules/libpr0n/decoders/png/nsPNGDecoder.cpp +++ b/modules/libpr0n/decoders/png/nsPNGDecoder.cpp @@ -302,26 +302,19 @@ nsPNGDecoder::info_callback(png_structp png_ptr, png_infop info_ptr) PRInt32 alpha_bits = 1; if (channels > 3) { - - if (color_type || PNG_COLOR_MASK_ALPHA) { - /* check if alpha is coming from a tRNS chunk and is binary */ - if (num_trans) { - alpha_bits = 1; - - /* if it's not a indexed color image, tRNS means binary */ - if (color_type == PNG_COLOR_TYPE_PALETTE) { - for (int i=0; ipixel_depth*/; /* 8 */ } } } else { - alpha_bits = 1; + alpha_bits = 8; } }