mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng17] Work in progress, merging with libpng-1.6.17rc01.
This commit is contained in:
parent
79a332afd0
commit
c2f0c9683f
2
pngget.c
2
pngget.c
@ -1124,7 +1124,7 @@ png_get_unknown_chunks(png_const_structrp png_ptr, png_inforp info_ptr,
|
||||
png_byte PNGAPI
|
||||
png_get_rgb_to_gray_status (png_const_structrp png_ptr)
|
||||
{
|
||||
return (png_byte)(png_ptr ? png_ptr->rgb_to_gray_status : 0);
|
||||
return (png_byte)((png_ptr ? png_ptr->rgb_to_gray_status : 0) & 0xff);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -168,7 +168,7 @@ png_push_read_sig(png_structrp png_ptr, png_inforp info_ptr)
|
||||
|
||||
png_push_fill_buffer(png_ptr, &(info_ptr->signature[num_checked]),
|
||||
num_to_check);
|
||||
png_ptr->sig_bytes = (png_byte)(png_ptr->sig_bytes + num_to_check);
|
||||
png_ptr->sig_bytes = (png_byte)((png_ptr->sig_bytes + num_to_check) & 0xff);
|
||||
|
||||
if (png_sig_cmp(info_ptr->signature, num_checked, num_to_check))
|
||||
{
|
||||
|
@ -2052,7 +2052,7 @@ make_rgb_colormap(png_image_read_control *display)
|
||||
|
||||
/* Return a palette index to the above palette given three 8-bit sRGB values. */
|
||||
#define PNG_RGB_INDEX(r,g,b) \
|
||||
((png_byte)(6 * (6 * PNG_DIV51(r) + PNG_DIV51(g)) + PNG_DIV51(b)))
|
||||
((png_byte)(0xff & (6 * (6 * PNG_DIV51(r) + PNG_DIV51(g)) + PNG_DIV51(b))))
|
||||
|
||||
static int
|
||||
png_image_read_colormap(png_voidp argument)
|
||||
@ -3025,7 +3025,8 @@ png_image_read_and_map(png_voidp argument)
|
||||
*outrow = gray;
|
||||
|
||||
else
|
||||
*outrow = (png_byte)(PNG_CMAP_TRANS_BACKGROUND+1);
|
||||
*outrow =
|
||||
(png_byte)(0xff & (PNG_CMAP_TRANS_BACKGROUND+1));
|
||||
}
|
||||
break;
|
||||
|
||||
|
20
pngrtran.c
20
pngrtran.c
@ -145,7 +145,7 @@ png_set_background_fixed(png_structrp png_ptr,
|
||||
|
||||
png_ptr->background = *background_color;
|
||||
png_ptr->background_gamma = background_gamma;
|
||||
png_ptr->background_gamma_type = (png_byte)(background_gamma_code);
|
||||
png_ptr->background_gamma_type = (png_byte)(0xff & background_gamma_code);
|
||||
|
||||
if (need_expand != 0)
|
||||
png_ptr->flags |= PNG_FLAG_BACKGROUND_EXPAND;
|
||||
@ -1928,14 +1928,14 @@ png_read_transform_info(png_structrp png_ptr, png_inforp info_ptr)
|
||||
|
||||
#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED
|
||||
if ((png_ptr->transformations & PNG_GRAY_TO_RGB) != 0)
|
||||
info_ptr->color_type = (png_byte)(info_ptr->color_type |
|
||||
PNG_COLOR_MASK_COLOR);
|
||||
info_ptr->color_type = (png_byte)(0xff & (info_ptr->color_type |
|
||||
PNG_COLOR_MASK_COLOR));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED
|
||||
if ((png_ptr->transformations & PNG_RGB_TO_GRAY) != 0)
|
||||
info_ptr->color_type = (png_byte)(info_ptr->color_type &
|
||||
~PNG_COLOR_MASK_COLOR);
|
||||
info_ptr->color_type = (png_byte)(0xff & (info_ptr->color_type &
|
||||
~PNG_COLOR_MASK_COLOR));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_READ_QUANTIZE_SUPPORTED
|
||||
@ -1977,8 +1977,8 @@ png_read_transform_info(png_structrp png_ptr, png_inforp info_ptr)
|
||||
#ifdef PNG_READ_STRIP_ALPHA_SUPPORTED
|
||||
if ((png_ptr->transformations & PNG_STRIP_ALPHA) != 0)
|
||||
{
|
||||
info_ptr->color_type = (png_byte)(info_ptr->color_type &
|
||||
~PNG_COLOR_MASK_ALPHA);
|
||||
info_ptr->color_type = (png_byte)(0xff & (info_ptr->color_type &
|
||||
~PNG_COLOR_MASK_ALPHA));
|
||||
info_ptr->num_trans = 0;
|
||||
}
|
||||
#endif
|
||||
@ -2011,8 +2011,8 @@ defined(PNG_READ_USER_TRANSFORM_SUPPORTED)
|
||||
}
|
||||
#endif
|
||||
|
||||
info_ptr->pixel_depth = (png_byte)(info_ptr->channels *
|
||||
info_ptr->bit_depth);
|
||||
info_ptr->pixel_depth = (png_byte)(0xff & (info_ptr->channels *
|
||||
info_ptr->bit_depth));
|
||||
|
||||
info_ptr->rowbytes = PNG_ROWBYTES(info_ptr->pixel_depth, info_ptr->width);
|
||||
|
||||
@ -2123,7 +2123,7 @@ png_do_unpack(png_row_infop row_info, png_bytep row)
|
||||
break;
|
||||
}
|
||||
row_info->bit_depth = 8;
|
||||
row_info->pixel_depth = (png_byte)(8 * row_info->channels);
|
||||
row_info->pixel_depth = (png_byte)(0xff & (8 * row_info->channels));
|
||||
row_info->rowbytes = row_width * row_info->channels;
|
||||
}
|
||||
}
|
||||
|
17
pngtrans.c
17
pngtrans.c
@ -1,8 +1,8 @@
|
||||
|
||||
/* pngtrans.c - transforms the data in a row (used by both readers and writers)
|
||||
*
|
||||
* Last changed in libpng 1.6.15 [November 20, 2014]
|
||||
* Copyright (c) 1998-2014 Glenn Randers-Pehrson
|
||||
* Last changed in libpng 1.6.17 [(PENDING RELEASE)]
|
||||
* Copyright (c) 1998-2015 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
@ -273,7 +273,7 @@ png_do_invert(png_row_infop row_info, png_bytep row)
|
||||
|
||||
for (i = 0; i < istop; i++)
|
||||
{
|
||||
*rp = (png_byte)(~(*rp));
|
||||
*rp = (png_byte)((~(*rp)) & 0xff);
|
||||
rp++;
|
||||
}
|
||||
}
|
||||
@ -287,7 +287,7 @@ png_do_invert(png_row_infop row_info, png_bytep row)
|
||||
|
||||
for (i = 0; i < istop; i += 2)
|
||||
{
|
||||
*rp = (png_byte)(~(*rp));
|
||||
*rp = (png_byte)((~(*rp)) & 0xff);
|
||||
rp += 2;
|
||||
}
|
||||
}
|
||||
@ -302,8 +302,8 @@ png_do_invert(png_row_infop row_info, png_bytep row)
|
||||
|
||||
for (i = 0; i < istop; i += 4)
|
||||
{
|
||||
*rp = (png_byte)(~(*rp));
|
||||
*(rp + 1) = (png_byte)(~(*(rp + 1)));
|
||||
*rp = (png_byte)((~(*rp)) & 0xff);
|
||||
*(rp + 1) = (png_byte)((~(*(rp + 1))) & 0xff);
|
||||
rp += 4;
|
||||
}
|
||||
}
|
||||
@ -803,8 +803,9 @@ png_set_user_transform_info(png_structrp png_ptr, png_voidp
|
||||
#endif
|
||||
|
||||
png_ptr->user_transform_ptr = user_transform_ptr;
|
||||
png_ptr->user_transform_depth = (png_byte)user_transform_depth;
|
||||
png_ptr->user_transform_channels = (png_byte)user_transform_channels;
|
||||
png_ptr->user_transform_depth = (png_byte)(user_transform_depth & 0xff);
|
||||
png_ptr->user_transform_channels =
|
||||
(png_byte)(user_transform_channels & 0xff);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
33
pngwtran.c
33
pngwtran.c
@ -1,8 +1,8 @@
|
||||
|
||||
/* pngwtran.c - transforms the data in a row for PNG writers
|
||||
*
|
||||
* Last changed in libpng 1.6.15 [November 20, 2014]
|
||||
* Copyright (c) 1998-2014 Glenn Randers-Pehrson
|
||||
* Last changed in libpng 1.6.17 [(PENDING RELEASE)]
|
||||
* Copyright (c) 1998-2015 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
@ -56,14 +56,14 @@ png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth)
|
||||
else
|
||||
{
|
||||
mask = 0x80;
|
||||
*dp = (png_byte)v;
|
||||
*dp = (png_byte)(v & 0xff);
|
||||
dp++;
|
||||
v = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (mask != 0x80)
|
||||
*dp = (png_byte)v;
|
||||
*dp = (png_byte)(v & 0xff);
|
||||
|
||||
break;
|
||||
}
|
||||
@ -90,7 +90,7 @@ png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth)
|
||||
if (shift == 0)
|
||||
{
|
||||
shift = 6;
|
||||
*dp = (png_byte)v;
|
||||
*dp = (png_byte)(v & 0xff);
|
||||
dp++;
|
||||
v = 0;
|
||||
}
|
||||
@ -102,7 +102,7 @@ png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth)
|
||||
}
|
||||
|
||||
if (shift != 6)
|
||||
*dp = (png_byte)v;
|
||||
*dp = (png_byte)(v & 0xff);
|
||||
|
||||
break;
|
||||
}
|
||||
@ -129,7 +129,7 @@ png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth)
|
||||
if (shift == 0)
|
||||
{
|
||||
shift = 4;
|
||||
*dp = (png_byte)v;
|
||||
*dp = (png_byte)(v & 0xff);
|
||||
dp++;
|
||||
v = 0;
|
||||
}
|
||||
@ -141,7 +141,7 @@ png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth)
|
||||
}
|
||||
|
||||
if (shift != 4)
|
||||
*dp = (png_byte)v;
|
||||
*dp = (png_byte)(v & 0xff);
|
||||
|
||||
break;
|
||||
}
|
||||
@ -150,8 +150,9 @@ png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth)
|
||||
break;
|
||||
}
|
||||
|
||||
row_info->bit_depth = (png_byte)bit_depth;
|
||||
row_info->pixel_depth = (png_byte)(bit_depth * row_info->channels);
|
||||
row_info->bit_depth = (png_byte)(bit_depth & 0xff);
|
||||
row_info->pixel_depth =
|
||||
(png_byte)((bit_depth * row_info->channels) & 0xff);
|
||||
row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth,
|
||||
row_info->width);
|
||||
}
|
||||
@ -422,7 +423,7 @@ png_do_write_invert_alpha(png_row_infop row_info, png_bytep row)
|
||||
*(dp++) = *(sp++);
|
||||
*/
|
||||
sp+=3; dp = sp;
|
||||
*(dp++) = (png_byte)(255 - *(sp++));
|
||||
*(dp++) = (png_byte)((255 - *(sp++)) & 0xff);
|
||||
}
|
||||
}
|
||||
|
||||
@ -445,8 +446,8 @@ png_do_write_invert_alpha(png_row_infop row_info, png_bytep row)
|
||||
*(dp++) = *(sp++);
|
||||
*/
|
||||
sp+=6; dp = sp;
|
||||
*(dp++) = (png_byte)(255 - *(sp++));
|
||||
*(dp++) = (png_byte)(255 - *(sp++));
|
||||
*(dp++) = (png_byte)((255 - *(sp++)) & 0xff);
|
||||
*(dp++) = (png_byte)((255 - *(sp++)) & 0xff);
|
||||
}
|
||||
}
|
||||
#endif /* WRITE_16BIT */
|
||||
@ -464,7 +465,7 @@ png_do_write_invert_alpha(png_row_infop row_info, png_bytep row)
|
||||
for (i = 0, sp = dp = row; i < row_width; i++)
|
||||
{
|
||||
*(dp++) = *(sp++);
|
||||
*(dp++) = (png_byte)(255 - *(sp++));
|
||||
*(dp++) = (png_byte)((255 - *(sp++)) & 0xff);
|
||||
}
|
||||
}
|
||||
|
||||
@ -483,8 +484,8 @@ png_do_write_invert_alpha(png_row_infop row_info, png_bytep row)
|
||||
*(dp++) = *(sp++);
|
||||
*/
|
||||
sp+=2; dp = sp;
|
||||
*(dp++) = (png_byte)(255 - *(sp++));
|
||||
*(dp++) = (png_byte)(255 - *(sp++));
|
||||
*(dp++) = (png_byte)((255 - *(sp++)) & 0xff);
|
||||
*(dp++) = (png_byte)((255 - *(sp++)) & 0xff);
|
||||
}
|
||||
}
|
||||
#endif /* WRITE_16BIT */
|
||||
|
76
pngwutil.c
76
pngwutil.c
@ -278,10 +278,10 @@ optimize_cmf(png_bytep data, png_alloc_size_t data_size)
|
||||
|
||||
z_cmf = (z_cmf & 0x0f) | (z_cinfo << 4);
|
||||
|
||||
data[0] = (png_byte)z_cmf;
|
||||
data[0] = (png_byte)(z_cmf & 0xff);
|
||||
tmp = data[1] & 0xe0;
|
||||
tmp += 0x1f - ((z_cmf << 8) + tmp) % 0x1f;
|
||||
data[1] = (png_byte)tmp;
|
||||
data[1] = (png_byte)(tmp & 0xff);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -749,7 +749,7 @@ png_check_keyword(png_structrp png_ptr, png_const_charp key, png_bytep new_key)
|
||||
|
||||
return key_len;
|
||||
}
|
||||
#endif
|
||||
#endif /* WRITE_TEXT || WRITE_pCAL || WRITE_iCCP || WRITE_sPLT */
|
||||
|
||||
/* Write the IHDR chunk, and update the png_struct with the necessary
|
||||
* information. Note that the rest of this code depends upon this
|
||||
@ -873,18 +873,18 @@ png_write_IHDR(png_structrp png_ptr, png_uint_32 width, png_uint_32 height,
|
||||
interlace_type=PNG_INTERLACE_NONE;
|
||||
#endif
|
||||
|
||||
/* Save the relevent information */
|
||||
png_ptr->bit_depth = (png_byte)bit_depth;
|
||||
png_ptr->color_type = (png_byte)color_type;
|
||||
png_ptr->interlaced = (png_byte)interlace_type;
|
||||
/* Save the relevant information */
|
||||
png_ptr->bit_depth = (png_byte)(bit_depth & 0xff);
|
||||
png_ptr->color_type = (png_byte)(color_type & 0xff);
|
||||
png_ptr->interlaced = (png_byte)(interlace_type & 0xff);
|
||||
#ifdef PNG_MNG_FEATURES_SUPPORTED
|
||||
png_ptr->filter_type = (png_byte)filter_type;
|
||||
png_ptr->filter_type = (png_byte)(filter_type & 0xff);
|
||||
#endif
|
||||
png_ptr->compression_type = (png_byte)compression_type;
|
||||
png_ptr->compression_type = (png_byte)(compression_type & 0xff);
|
||||
png_ptr->width = width;
|
||||
png_ptr->height = height;
|
||||
|
||||
png_ptr->pixel_depth = (png_byte)(bit_depth * png_ptr->channels);
|
||||
png_ptr->pixel_depth = (png_byte)((bit_depth * png_ptr->channels) & 0xff);
|
||||
png_ptr->rowbytes = PNG_ROWBYTES(png_ptr->pixel_depth, width);
|
||||
/* Set the usr info, so any transformations can modify it */
|
||||
png_ptr->usr_width = png_ptr->width;
|
||||
@ -894,11 +894,11 @@ png_write_IHDR(png_structrp png_ptr, png_uint_32 width, png_uint_32 height,
|
||||
/* Pack the header information into the buffer */
|
||||
png_save_uint_32(buf, width);
|
||||
png_save_uint_32(buf + 4, height);
|
||||
buf[8] = (png_byte)bit_depth;
|
||||
buf[9] = (png_byte)color_type;
|
||||
buf[10] = (png_byte)compression_type;
|
||||
buf[11] = (png_byte)filter_type;
|
||||
buf[12] = (png_byte)interlace_type;
|
||||
buf[8] = (png_byte)(bit_depth & 0xff);
|
||||
buf[9] = (png_byte)(color_type & 0xff);
|
||||
buf[10] = (png_byte)(compression_type & 0xff);
|
||||
buf[11] = (png_byte)(filter_type & 0xff);
|
||||
buf[12] = (png_byte)(interlace_type & 0xff);
|
||||
|
||||
/* Write the chunk */
|
||||
png_write_complete_chunk(png_ptr, png_IHDR, buf, (png_size_t)13);
|
||||
@ -1183,7 +1183,7 @@ png_write_sRGB(png_structrp png_ptr, int srgb_intent)
|
||||
png_warning(png_ptr,
|
||||
"Invalid sRGB rendering intent specified");
|
||||
|
||||
buf[0]=(png_byte)srgb_intent;
|
||||
buf[0]=(png_byte)(srgb_intent & 0xff);
|
||||
png_write_complete_chunk(png_ptr, png_sRGB, buf, (png_size_t)1);
|
||||
}
|
||||
#endif
|
||||
@ -1285,10 +1285,10 @@ png_write_sPLT(png_structrp png_ptr, png_const_sPLT_tp spalette)
|
||||
{
|
||||
if (spalette->depth == 8)
|
||||
{
|
||||
entrybuf[0] = (png_byte)ep->red;
|
||||
entrybuf[1] = (png_byte)ep->green;
|
||||
entrybuf[2] = (png_byte)ep->blue;
|
||||
entrybuf[3] = (png_byte)ep->alpha;
|
||||
entrybuf[0] = (png_byte)(ep->red & 0xff);
|
||||
entrybuf[1] = (png_byte)(ep->green & 0xff);
|
||||
entrybuf[2] = (png_byte)(ep->blue & 0xff);
|
||||
entrybuf[3] = (png_byte)(ep->alpha & 0xff);
|
||||
png_save_uint_16(entrybuf + 4, ep->frequency);
|
||||
}
|
||||
|
||||
@ -1309,10 +1309,10 @@ png_write_sPLT(png_structrp png_ptr, png_const_sPLT_tp spalette)
|
||||
{
|
||||
if (spalette->depth == 8)
|
||||
{
|
||||
entrybuf[0] = (png_byte)ep[i].red;
|
||||
entrybuf[1] = (png_byte)ep[i].green;
|
||||
entrybuf[2] = (png_byte)ep[i].blue;
|
||||
entrybuf[3] = (png_byte)ep[i].alpha;
|
||||
entrybuf[0] = (png_byte)(ep[i].red & 0xff);
|
||||
entrybuf[1] = (png_byte)(ep[i].green & 0xff);
|
||||
entrybuf[2] = (png_byte)(ep[i].blue & 0xff);
|
||||
entrybuf[3] = (png_byte)(ep[i].alpha & 0xff);
|
||||
png_save_uint_16(entrybuf + 4, ep[i].frequency);
|
||||
}
|
||||
|
||||
@ -1348,8 +1348,8 @@ png_write_sBIT(png_structrp png_ptr, png_const_color_8p sbit, int color_type)
|
||||
{
|
||||
png_byte maxbits;
|
||||
|
||||
maxbits = (png_byte)(color_type==PNG_COLOR_TYPE_PALETTE ? 8 :
|
||||
png_ptr->usr_bit_depth);
|
||||
maxbits = color_type==PNG_COLOR_TYPE_PALETTE ? 8 :
|
||||
(png_byte)(png_ptr->usr_bit_depth & 0xff);
|
||||
|
||||
if (sbit->red == 0 || sbit->red > maxbits ||
|
||||
sbit->green == 0 || sbit->green > maxbits ||
|
||||
@ -1790,7 +1790,7 @@ png_write_oFFs(png_structrp png_ptr, png_int_32 x_offset, png_int_32 y_offset,
|
||||
|
||||
png_save_int_32(buf, x_offset);
|
||||
png_save_int_32(buf + 4, y_offset);
|
||||
buf[8] = (png_byte)unit_type;
|
||||
buf[8] = (png_byte)(unit_type & 0xff);
|
||||
|
||||
png_write_complete_chunk(png_ptr, png_oFFs, buf, (png_size_t)9);
|
||||
}
|
||||
@ -1845,8 +1845,8 @@ png_write_pCAL(png_structrp png_ptr, png_charp purpose, png_int_32 X0,
|
||||
png_write_chunk_data(png_ptr, new_purpose, purpose_len);
|
||||
png_save_int_32(buf, X0);
|
||||
png_save_int_32(buf + 4, X1);
|
||||
buf[8] = (png_byte)type;
|
||||
buf[9] = (png_byte)nparams;
|
||||
buf[8] = (png_byte)(type & 0xff);
|
||||
buf[9] = (png_byte)(nparams & 0xff);
|
||||
png_write_chunk_data(png_ptr, buf, (png_size_t)10);
|
||||
png_write_chunk_data(png_ptr, (png_const_bytep)units, (png_size_t)units_len);
|
||||
|
||||
@ -1881,7 +1881,7 @@ png_write_sCAL_s(png_structrp png_ptr, int unit, png_const_charp width,
|
||||
return;
|
||||
}
|
||||
|
||||
buf[0] = (png_byte)unit;
|
||||
buf[0] = (png_byte)(unit & 0xff);
|
||||
memcpy(buf + 1, width, wlen + 1); /* Append the '\0' here */
|
||||
memcpy(buf + wlen + 2, height, hlen); /* Do NOT append the '\0' here */
|
||||
|
||||
@ -1906,7 +1906,7 @@ png_write_pHYs(png_structrp png_ptr, png_uint_32 x_pixels_per_unit,
|
||||
|
||||
png_save_uint_32(buf, x_pixels_per_unit);
|
||||
png_save_uint_32(buf + 4, y_pixels_per_unit);
|
||||
buf[8] = (png_byte)unit_type;
|
||||
buf[8] = (png_byte)(unit_type & 0xff);
|
||||
|
||||
png_write_complete_chunk(png_ptr, png_pHYs, buf, (png_size_t)9);
|
||||
}
|
||||
@ -2019,7 +2019,7 @@ png_write_start_row(png_structrp png_ptr)
|
||||
|
||||
/* 1.5.6: added to allow checking in the row write code. */
|
||||
png_ptr->transformed_pixel_depth = png_ptr->pixel_depth;
|
||||
png_ptr->maximum_pixel_depth = (png_byte)usr_pixel_depth;
|
||||
png_ptr->maximum_pixel_depth = (png_byte)(usr_pixel_depth & 0xff);
|
||||
|
||||
/* Set up row buffer */
|
||||
png_ptr->row_buf = png_voidcast(png_bytep, png_malloc(png_ptr, buf_size));
|
||||
@ -2215,7 +2215,7 @@ png_do_write_interlace(png_row_infop row_info, png_bytep row, int pass)
|
||||
if (shift == 0)
|
||||
{
|
||||
shift = 7;
|
||||
*dp++ = (png_byte)d;
|
||||
*dp++ = (png_byte)(d & 0xff);
|
||||
d = 0;
|
||||
}
|
||||
|
||||
@ -2224,7 +2224,7 @@ png_do_write_interlace(png_row_infop row_info, png_bytep row, int pass)
|
||||
|
||||
}
|
||||
if (shift != 7)
|
||||
*dp = (png_byte)d;
|
||||
*dp = (png_byte)(d & 0xff);
|
||||
|
||||
break;
|
||||
}
|
||||
@ -2253,7 +2253,7 @@ png_do_write_interlace(png_row_infop row_info, png_bytep row, int pass)
|
||||
if (shift == 0)
|
||||
{
|
||||
shift = 6;
|
||||
*dp++ = (png_byte)d;
|
||||
*dp++ = (png_byte)(d & 0xff);
|
||||
d = 0;
|
||||
}
|
||||
|
||||
@ -2261,7 +2261,7 @@ png_do_write_interlace(png_row_infop row_info, png_bytep row, int pass)
|
||||
shift -= 2;
|
||||
}
|
||||
if (shift != 6)
|
||||
*dp = (png_byte)d;
|
||||
*dp = (png_byte)(d & 0xff);
|
||||
|
||||
break;
|
||||
}
|
||||
@ -2289,7 +2289,7 @@ png_do_write_interlace(png_row_infop row_info, png_bytep row, int pass)
|
||||
if (shift == 0)
|
||||
{
|
||||
shift = 4;
|
||||
*dp++ = (png_byte)d;
|
||||
*dp++ = (png_byte)(d & 0xff);
|
||||
d = 0;
|
||||
}
|
||||
|
||||
@ -2297,7 +2297,7 @@ png_do_write_interlace(png_row_infop row_info, png_bytep row, int pass)
|
||||
shift -= 4;
|
||||
}
|
||||
if (shift != 4)
|
||||
*dp = (png_byte)d;
|
||||
*dp = (png_byte)(d & 0xff);
|
||||
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user