[devel] Cleanup of conditional compilation code and of background/gamma

handling. Internal changes only except for a new option to avoid compiling
in the png_build_grayscale_palette API (which is not used at all internally.)
The main change is to move the transform tests (READ_TRANSFORMS,
WRITE_TRANSFORMS) up one level to the caller of the APIs.
This commit is contained in:
John Bowler
2011-04-17 18:34:22 -05:00
committed by Glenn Randers-Pehrson
parent a1f9426399
commit 4a12f4a22a
11 changed files with 261 additions and 182 deletions

View File

@@ -457,7 +457,11 @@ png_read_update_info(png_structp png_ptr, png_infop info_ptr)
"Ignoring extra png_read_update_info() call;"
" row buffer not reallocated");
#ifdef PNG_READ_TRANSFORMS_SUPPORTED
png_read_transform_info(png_ptr, info_ptr);
#else
PNG_UNUSED(info_ptr)
#endif
}
#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
@@ -704,8 +708,10 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row)
#endif
#ifdef PNG_READ_TRANSFORMS_SUPPORTED
if (png_ptr->transformations)
png_do_read_transformations(png_ptr);
#endif
#ifdef PNG_READ_INTERLACING_SUPPORTED
/* Blow up interlaced rows to full size */