mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng16] Imported from libpng-1.6.13beta02.tar
This commit is contained in:
12
pngread.c
12
pngread.c
@@ -1220,7 +1220,7 @@ png_read_png(png_structrp png_ptr, png_inforp info_ptr,
|
||||
# define P_LINEAR8 4 /* 8-bit linear: only from a file value */
|
||||
|
||||
/* Color-map processing: after libpng has run on the PNG image further
|
||||
* processing may be needed to conver the data to color-map indicies.
|
||||
* processing may be needed to conver the data to color-map indices.
|
||||
*/
|
||||
#define PNG_CMAP_NONE 0
|
||||
#define PNG_CMAP_GA 1 /* Process GA data to a color-map with alpha */
|
||||
@@ -2187,7 +2187,7 @@ png_image_read_colormap(png_voidp argument)
|
||||
data_encoding = P_FILE;
|
||||
|
||||
/* The rows from libpng, while technically gray values, are now also
|
||||
* color-map indicies; however, they may need to be expanded to 1
|
||||
* color-map indices; however, they may need to be expanded to 1
|
||||
* byte per pixel. This is what png_set_packing does (i.e., it
|
||||
* unpacks the bit values into bytes.)
|
||||
*/
|
||||
@@ -2273,8 +2273,8 @@ png_image_read_colormap(png_voidp argument)
|
||||
* 8-bit GA and it has to be processing to single byte color-map
|
||||
* values. Entry 254 is replaced by either a completely
|
||||
* transparent entry or by the background color at full
|
||||
* precision (and the background color is not a simple gray leve
|
||||
* in this case.)
|
||||
* precision (and the background color is not a simple gray
|
||||
* level in this case.)
|
||||
*/
|
||||
expand_tRNS = 1;
|
||||
output_processing = PNG_CMAP_TRANS;
|
||||
@@ -2752,7 +2752,7 @@ png_image_read_colormap(png_voidp argument)
|
||||
num_trans = 0;
|
||||
|
||||
output_processing = PNG_CMAP_NONE;
|
||||
data_encoding = P_FILE; /* Don't change from color-map indicies */
|
||||
data_encoding = P_FILE; /* Don't change from color-map indices */
|
||||
cmap_entries = png_ptr->num_palette;
|
||||
if (cmap_entries > 256)
|
||||
cmap_entries = 256;
|
||||
@@ -2792,7 +2792,7 @@ png_image_read_colormap(png_voidp argument)
|
||||
i < num_trans ? trans[i] : 255U, P_FILE/*8-bit*/);
|
||||
}
|
||||
|
||||
/* The PNG data may have indicies packed in fewer than 8 bits, it
|
||||
/* The PNG data may have indices packed in fewer than 8 bits, it
|
||||
* must be expanded if so.
|
||||
*/
|
||||
if (png_ptr->bit_depth < 8)
|
||||
|
||||
Reference in New Issue
Block a user