mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[devel] Added PNG_{READ,WRITE}_INT_FUNCTIONS_SUPPORTED.
This allows the functions to read and write ints to be disabled independently of PNG_USE_READ_MACROS, which allows libpng to be built with the functions even though the default is to use the macros - this allows applications to choose at app build time whether or not to use macros (previously impossible because the functions weren't in the default build.)
This commit is contained in:
@@ -137,6 +137,18 @@ setting API_RULE default 0
|
||||
# Default to using the read macros
|
||||
setting DEFAULT_READ_MACROS default 1
|
||||
|
||||
# The alternative is to call functions to read PNG values, if
|
||||
# the functions are turned *off* the read macros must always
|
||||
# be enabled, so turning this off will actually force the
|
||||
# USE_READ_MACROS option on (see pngconf.h)
|
||||
option READ_INT_FUNCTIONS requires READ
|
||||
|
||||
# The same for write, but these can only be switched off if
|
||||
# no writing is required at all - hence the use of an 'enables'
|
||||
# not a 'requires' below:
|
||||
option WRITE_INT_FUNCTIONS off
|
||||
option WRITE enables WRITE_INT_FUNCTIONS
|
||||
|
||||
# Generic options - affect both read and write.
|
||||
option BENIGN_ERRORS off
|
||||
option MNG_FEATURES
|
||||
@@ -361,7 +373,7 @@ option WRITE_UNKNOWN_CHUNKS requires WRITE
|
||||
|
||||
option HANDLE_AS_UNKNOWN
|
||||
|
||||
option GET_INT_32 requires READ
|
||||
option GET_INT_32 requires READ READ_INT_FUNCTIONS
|
||||
# png_get_int_32 is required by the ancillary chunks oFFs and pCAL
|
||||
option READ_oFFs enables GET_INT_32
|
||||
option READ_pCAL enables GET_INT_32
|
||||
|
||||
Reference in New Issue
Block a user