diff options
Diffstat (limited to 'pngrtran.c')
-rw-r--r-- | pngrtran.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/pngrtran.c b/pngrtran.c index 3302a7c63..e61be8782 100644 --- a/pngrtran.c +++ b/pngrtran.c @@ -2995,11 +2995,11 @@ png_do_rgb_to_gray(png_structrp png_ptr, png_row_infop row_info, png_bytep row) if ((row_info->color_type & PNG_COLOR_MASK_PALETTE) == 0 && (row_info->color_type & PNG_COLOR_MASK_COLOR) != 0) { - PNG_CONST png_uint_32 rc = png_ptr->rgb_to_gray_red_coeff; - PNG_CONST png_uint_32 gc = png_ptr->rgb_to_gray_green_coeff; - PNG_CONST png_uint_32 bc = 32768 - rc - gc; - PNG_CONST png_uint_32 row_width = row_info->width; - PNG_CONST int have_alpha = + const png_uint_32 rc = png_ptr->rgb_to_gray_red_coeff; + const png_uint_32 gc = png_ptr->rgb_to_gray_green_coeff; + const png_uint_32 bc = 32768 - rc - gc; + const png_uint_32 row_width = row_info->width; + const int have_alpha = (row_info->color_type & PNG_COLOR_MASK_ALPHA) != 0; if (row_info->bit_depth == 8) @@ -4143,11 +4143,11 @@ png_do_encode_alpha(png_row_infop row_info, png_bytep row, png_structrp png_ptr) { if (row_info->bit_depth == 8) { - PNG_CONST png_bytep table = png_ptr->gamma_from_1; + const png_bytep table = png_ptr->gamma_from_1; if (table != NULL) { - PNG_CONST int step = + const int step = (row_info->color_type & PNG_COLOR_MASK_COLOR) ? 4 : 2; /* The alpha channel is the last component: */ @@ -4162,12 +4162,12 @@ png_do_encode_alpha(png_row_infop row_info, png_bytep row, png_structrp png_ptr) else if (row_info->bit_depth == 16) { - PNG_CONST png_uint_16pp table = png_ptr->gamma_16_from_1; - PNG_CONST int gamma_shift = png_ptr->gamma_shift; + const png_uint_16pp table = png_ptr->gamma_16_from_1; + const int gamma_shift = png_ptr->gamma_shift; if (table != NULL) { - PNG_CONST int step = + const int step = (row_info->color_type & PNG_COLOR_MASK_COLOR) ? 8 : 4; /* The alpha channel is the last component: */ |