mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng16] Added configuration support for benign errors and changed the read
default. Also changed some warnings in the iCCP and sRGB handling from to benign errors. Configuration now makes read benign errors warnings and write benign errors to errors by default (thus changing the behavior on read). The simplified API always forces read benign errors to errors (regardless of the system default, unless this is disabled in which case the simplified API can't be built.)
This commit is contained in:
committed by
Glenn Randers-Pehrson
parent
209b3e4b79
commit
aa816c4444
@@ -186,10 +186,36 @@ option READ_INT_FUNCTIONS requires READ
|
||||
option WRITE_INT_FUNCTIONS disabled
|
||||
option WRITE enables WRITE_INT_FUNCTIONS
|
||||
|
||||
# Generic options - affect both read and write.
|
||||
# Error controls
|
||||
#
|
||||
# WARNINGS: normally on, if off no warnings are generated
|
||||
# ERROR_TEXT: normally on, if off errors happen but there is no message
|
||||
# ERROR_NUMBERS: unimplemented feature, therefore disabled
|
||||
# BENIGN_ERRORS: support for just issuing warnings for recoverable errors
|
||||
#
|
||||
# BENIGN_READ_ERRORS:
|
||||
# By default recoverable errors on read should just generate warnings,
|
||||
# generally safe but PNG files that don't conform to the specification will
|
||||
# be accepted if a meaningful result can be produced.
|
||||
#
|
||||
# BENIGN_WRITE_ERRORS:
|
||||
# By default recoverable errors on write should just generate warnings,
|
||||
# not generally safe because this allows the application to write invalid
|
||||
# PNG files. Applications should enable this themselves; it's useful
|
||||
# because it means that a failure to write an ancilliary chunk can often be
|
||||
# ignored.
|
||||
|
||||
option WARNINGS
|
||||
option ERROR_TEXT
|
||||
option ERROR_NUMBERS disabled
|
||||
|
||||
option BENIGN_ERRORS
|
||||
option BENIGN_WRITE_ERRORS requires BENIGN_ERRORS disabled
|
||||
option BENIGN_READ_ERRORS requires BENIGN_ERRORS
|
||||
|
||||
|
||||
# Generic options - affect both read and write.
|
||||
|
||||
option MNG_FEATURES
|
||||
|
||||
# Arithmetic options, the first is the big switch that chooses between internal
|
||||
@@ -200,10 +226,6 @@ option FLOATING_ARITHMETIC
|
||||
option FLOATING_POINT enables ok_math
|
||||
option FIXED_POINT enables ok_math
|
||||
|
||||
# Added at libpng version 1.4.0
|
||||
|
||||
option ERROR_TEXT
|
||||
|
||||
# The following is always on (defined empty)
|
||||
|
||||
setting CALLOC_SUPPORTED default
|
||||
@@ -230,10 +252,6 @@ option TIME_RFC1123
|
||||
option SETJMP
|
||||
= NO_SETJMP SETJMP_NOT_SUPPORTED
|
||||
|
||||
# For the moment this is disabled (no code support):
|
||||
|
||||
option ERROR_NUMBERS disabled
|
||||
|
||||
# If this is disabled it is not possible for apps to get the
|
||||
# values from the 'info' structure, this effectively removes
|
||||
# quite a lot of the READ API.
|
||||
@@ -622,6 +640,7 @@ option WRITE_CHECK_FOR_INVALID_INDEX requires WRITE CHECK_FOR_INVALID_INDEX
|
||||
# Simplified API options (added at libpng-1.6.0)
|
||||
# Read:
|
||||
option SIMPLIFIED_READ requires SEQUENTIAL_READ READ_TRANSFORMS SETJMP
|
||||
option SIMPLIFIED_READ requires BENIGN_ERRORS
|
||||
option SIMPLIFIED_READ enables READ_EXPAND READ_16BIT READ_EXPAND_16
|
||||
option SIMPLIFIED_READ enables READ_SCALE_16_TO_8 READ_RGB_TO_GRAY
|
||||
option SIMPLIFIED_READ enables READ_ALPHA_MODE READ_BACKGROUND READ_STRIP_ALPHA
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
/* pnglibconf.h - library build configuration */
|
||||
|
||||
/* Libpng 1.6.0beta18 - March 10, 2012 */
|
||||
/* Libpng 1.6.0beta18 - March 16, 2012 */
|
||||
|
||||
/* Copyright (c) 1998-2012 Glenn Randers-Pehrson */
|
||||
|
||||
@@ -40,6 +40,8 @@
|
||||
#define PNG_16BIT_SUPPORTED
|
||||
#define PNG_ALIGN_MEMORY_SUPPORTED
|
||||
#define PNG_BENIGN_ERRORS_SUPPORTED
|
||||
#define PNG_BENIGN_READ_ERRORS_SUPPORTED
|
||||
/*#undef PNG_BENIGN_WRITE_ERRORS_SUPPORTED*/
|
||||
#define PNG_bKGD_SUPPORTED
|
||||
#define PNG_BUILD_GRAYSCALE_PALETTE_SUPPORTED
|
||||
#define PNG_CHECK_cHRM_SUPPORTED
|
||||
@@ -120,6 +122,7 @@
|
||||
#define PNG_READ_USER_CHUNKS_SUPPORTED
|
||||
#define PNG_READ_USER_TRANSFORM_SUPPORTED
|
||||
#define PNG_READ_zTXt_SUPPORTED
|
||||
/*#undef PNG_SAFE_LIMITS_SUPPORTED*/
|
||||
#define PNG_SAVE_INT_32_SUPPORTED
|
||||
#define PNG_sBIT_SUPPORTED
|
||||
#define PNG_sCAL_SUPPORTED
|
||||
|
||||
Reference in New Issue
Block a user