mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng16] Fixed byte order in 2-byte filler, in png_do_read_filler().
This commit is contained in:
committed by
Glenn Randers-Pehrson
parent
19ec55f40e
commit
cde8cd6b30
14
pngrtran.c
14
pngrtran.c
@@ -2715,13 +2715,13 @@ png_do_read_filler(png_row_infop row_info, png_bytep row,
|
||||
png_bytep dp = sp + (png_size_t)row_width * 2;
|
||||
for (i = 1; i < row_width; i++)
|
||||
{
|
||||
*(--dp) = hi_filler;
|
||||
*(--dp) = lo_filler;
|
||||
*(--dp) = hi_filler;
|
||||
*(--dp) = *(--sp);
|
||||
*(--dp) = *(--sp);
|
||||
}
|
||||
*(--dp) = hi_filler;
|
||||
*(--dp) = lo_filler;
|
||||
*(--dp) = hi_filler;
|
||||
row_info->channels = 2;
|
||||
row_info->pixel_depth = 32;
|
||||
row_info->rowbytes = row_width * 4;
|
||||
@@ -2736,8 +2736,8 @@ png_do_read_filler(png_row_infop row_info, png_bytep row,
|
||||
{
|
||||
*(--dp) = *(--sp);
|
||||
*(--dp) = *(--sp);
|
||||
*(--dp) = hi_filler;
|
||||
*(--dp) = lo_filler;
|
||||
*(--dp) = hi_filler;
|
||||
}
|
||||
row_info->channels = 2;
|
||||
row_info->pixel_depth = 32;
|
||||
@@ -2796,8 +2796,8 @@ png_do_read_filler(png_row_infop row_info, png_bytep row,
|
||||
png_bytep dp = sp + (png_size_t)row_width * 2;
|
||||
for (i = 1; i < row_width; i++)
|
||||
{
|
||||
*(--dp) = hi_filler;
|
||||
*(--dp) = lo_filler;
|
||||
*(--dp) = hi_filler;
|
||||
*(--dp) = *(--sp);
|
||||
*(--dp) = *(--sp);
|
||||
*(--dp) = *(--sp);
|
||||
@@ -2805,8 +2805,8 @@ png_do_read_filler(png_row_infop row_info, png_bytep row,
|
||||
*(--dp) = *(--sp);
|
||||
*(--dp) = *(--sp);
|
||||
}
|
||||
*(--dp) = hi_filler;
|
||||
*(--dp) = lo_filler;
|
||||
*(--dp) = hi_filler;
|
||||
row_info->channels = 4;
|
||||
row_info->pixel_depth = 64;
|
||||
row_info->rowbytes = row_width * 8;
|
||||
@@ -2825,8 +2825,8 @@ png_do_read_filler(png_row_infop row_info, png_bytep row,
|
||||
*(--dp) = *(--sp);
|
||||
*(--dp) = *(--sp);
|
||||
*(--dp) = *(--sp);
|
||||
*(--dp) = hi_filler;
|
||||
*(--dp) = lo_filler;
|
||||
*(--dp) = hi_filler;
|
||||
}
|
||||
|
||||
row_info->channels = 4;
|
||||
@@ -4837,7 +4837,7 @@ png_do_read_transformations(png_structrp png_ptr, png_row_infop row_info)
|
||||
/* Because PNG_COMPOSE does the gamma transform if there is something to
|
||||
* do (if there is an alpha channel or transparency.)
|
||||
*/
|
||||
!((png_ptr->transformations & PNG_COMPOSE) &&
|
||||
!((png_ptr->transformations & PNG_COMPOSE) != 0 &&
|
||||
((png_ptr->num_trans != 0) ||
|
||||
(png_ptr->color_type & PNG_COLOR_MASK_ALPHA) != 0)) &&
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user