diff options
author | John Bowler <jbowler@acm.org> | 2012-10-25 19:30:02 -0500 |
---|---|---|
committer | Glenn Randers-Pehrson <glennrp at users.sourceforge.net> | 2012-10-25 19:30:02 -0500 |
commit | f8dfd123e2b337f0ce3c484bbcfec10c4c8daddc (patch) | |
tree | 104fc10e92f7852a2c5131a308b1449d88997828 /scripts | |
parent | e6b710cb3fc573688c2150f9b777156f5d053518 (diff) | |
download | libpng-f8dfd123e2b337f0ce3c484bbcfec10c4c8daddc.tar.gz |
[libpng16] Changed ICC profile support to allow use of an external color
management system (CMS). In practice it is not possible to obtain cHRM
information reliably using just the end-point tags because they do not exist
in the vast majority of profiles. Instead it is necessary to run the endpoints
through the ICC colorimetric intent transform (as described in the v4
spec). Since this is likely to be too much code inside libpng for too
little gain (it implies a fairly complete CMS implementation) the code
has been changed to allow an external CMS to be used. This code is
temporarily disabled until a suitable set of test cases using one or more
external CMS implementations have been implemented.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/pnglibconf.dfa | 21 | ||||
-rw-r--r-- | scripts/pnglibconf.h.prebuilt | 3 | ||||
-rw-r--r-- | scripts/symbols.def | 3 | ||||
-rw-r--r-- | scripts/symbols.dfn | 1 |
4 files changed, 23 insertions, 5 deletions
diff --git a/scripts/pnglibconf.dfa b/scripts/pnglibconf.dfa index b5b1fca67..0a3c659c7 100644 --- a/scripts/pnglibconf.dfa +++ b/scripts/pnglibconf.dfa @@ -478,6 +478,20 @@ option WRITE_TEXT requires WRITE_ANCILLARY_CHUNKS enables TEXT option GAMMA disabled option COLORSPACE enables GAMMA disabled +# ICC profile support; basic ICC profile support is enabled if iCCP chunk read +# or write is enabled. The application must perform all iCCP profile handling +# itself. If full support is enabled with the option below libpng will attempt +# to do more processing using the profile data itself, this includes setting +# appropriate values for cHRM and gAMA chunks if not present in the stream. +# +# ICC profile support is not build in to core libpng because of the size of the +# code required; an external ICC implementation must be passed to libpng to +# enable it. +# +# WARNING: this option is CURRENTLY UNTESTED because a test CMS implementation +# has not yet been written, as a result it is disabled in current beta builds. +option ICC requires iCCP enables SAVE_INT_32 disabled + # When an ICC profile is read, or png_set, it will be checked for a match # against known sRGB profiles if the sRGB handling is enabled. This # setting controls how much work is done during the check: @@ -694,9 +708,10 @@ option CONVERT_tIME requires WRITE_ANCILLARY_CHUNKS option WRITE_FILTER requires WRITE -option SAVE_INT_32 requires WRITE - -# png_save_int_32 is required by the ancillary chunks oFFs and pCAL +option SAVE_INT_32 disabled +# png_save_int_32 is required internally for writing the ancillary chunks oFFs +# and pCAL and for both reading and writing iCCP (for the generation/checking of +# the corresponding cHRM/gAMA chunks) if full ICC is supported. # added at libpng-1.5.4 diff --git a/scripts/pnglibconf.h.prebuilt b/scripts/pnglibconf.h.prebuilt index eb45a9fdd..59cc1ce95 100644 --- a/scripts/pnglibconf.h.prebuilt +++ b/scripts/pnglibconf.h.prebuilt @@ -3,7 +3,7 @@ /* pnglibconf.h - library build configuration */ -/* Libpng 1.6.0beta31 - October 24, 2012 */ +/* Libpng 1.6.0beta31 - October 26, 2012 */ /* Copyright (c) 1998-2012 Glenn Randers-Pehrson */ @@ -63,6 +63,7 @@ #define PNG_HANDLE_AS_UNKNOWN_SUPPORTED #define PNG_hIST_SUPPORTED #define PNG_iCCP_SUPPORTED +/*#undef PNG_ICC_SUPPORTED*/ #define PNG_INCH_CONVERSIONS_SUPPORTED #define PNG_INFO_IMAGE_SUPPORTED #define PNG_IO_STATE_SUPPORTED diff --git a/scripts/symbols.def b/scripts/symbols.def index 10074f2fc..92c0a703c 100644 --- a/scripts/symbols.def +++ b/scripts/symbols.def @@ -205,7 +205,6 @@ EXPORTS png_get_y_offset_inches @197 png_get_pHYs_dpi @198 png_get_io_state @199 -;png_get_io_chunk_name @200 png_get_uint_32 @201 png_get_uint_16 @202 png_get_int_32 @203 @@ -248,3 +247,5 @@ EXPORTS png_image_write_to_stdio @240 png_convert_to_rfc1123_buffer @241 png_set_check_for_invalid_index @242 + png_set_cms @243 + png_set_cms_output @244 diff --git a/scripts/symbols.dfn b/scripts/symbols.dfn index d790929e7..7d0d3d050 100644 --- a/scripts/symbols.dfn +++ b/scripts/symbols.dfn @@ -42,6 +42,7 @@ #define PNG_READ_BIG_ENDIAN_SUPPORTED /* should do nothing! */ #define PNG_INCH_CONVERSIONS_SUPPORTED #define PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED +#define PNG_ICC_SUPPORTED /* currently disabled */ #undef PNG_H #include "../png.h" |