Compression changes/fixes

Simplified API: change handling of PNG_IMAGE_FLAG_FAST to use
PNG_COMPRESSION_HIGH_SPEED, and PNG_COMPRESSION_HIGH otherwise.

Compression: add missing break statements that caused some compression settings
to fall through to the 'HIGH' setting.

Internal: remove png_struct::flags, it only stored the 'library mismatch' flag
and that could never be accessed (because immediately after it was set the
png_struct, which was on the stack, was eliminated.)

Signed-off-by: John Bowler <jbowler@acm.org>
This commit is contained in:
John Bowler
2016-06-08 08:37:20 -07:00
parent b70b51ba17
commit d52c8eba99
5 changed files with 29 additions and 56 deletions

View File

@@ -394,7 +394,6 @@ struct png_struct_def
png_uint_32 chunk_length; /* Length (possibly remaining) in said chunk. */
png_uint_32 crc; /* current chunk CRC value */
unsigned int flags; /* flags (should be bit fields) */
unsigned int mode :6; /* where we are in the PNG file */
unsigned int read_struct :1; /* this is a read (not write) struct */
unsigned int num_palette :9; /* number of color entries in palette */