« Return to Thread: Libpng-1.4.0 versus libpng-1.2.41

Libpng-1.4.0 versus libpng-1.2.41

by Glenn Randers-Pehrson :: Rate this Message:

Reply to Author | View in Thread

Here is a list of most changes from 1.2.x to 1.4.x, extracted
from libpng*.txt and with some commentary (indented).  I think
the only pressure to release 1.4.0 is to gain iTXt support.  None
of the other changes seem to me to matter enough to warrant
quickly pushing out a new release.

IX.  Changes to Libpng from version 1.0.x/1.2.x to 1.4.x

Private libpng prototypes and macro definitions were moved from
png.h and pngconf.h into a new pngpriv.h header file.

     This must wait for 1.4.0

Support for the iTXt chunk has been enabled by default.

     Could probably be added to 1.2.41 but would be somewhat
     ugly.

     The decision whether to release 1.4.0 soon or to proceed
     with 1.2.41 hinges on this.

Support for global arrays was removed.

     This must wait for 1.4.0

Some obsolete/deprecated macros and functions have been removed.

     This must wait for 1.4.0

These macros are deprecated:

    PNG_READ_TRANSFORMS_NOT_SUPPORTED
    PNG_PROGRESSIVE_READ_NOT_SUPPORTED
    PNG_NO_SEQUENTIAL_READ_SUPPORTED
    PNG_WRITE_TRANSFORMS_NOT_SUPPORTED
    PNG_READ_ANCILLARY_CHUNKS_NOT_SUPPORTED
    PNG_WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED

They have been replaced, respectively, by:

    PNG_NO_READ_TRANSFORMS
    PNG_NO_PROGRESSIVE_READ
    PNG_NO_SEQUENTIAL_READ
    PNG_NO_WRITE_TRANSFORMS
    PNG_NO_READ_ANCILLARY_CHUNKS
    PNG_NO_WRITE_ANCILLARY_CHUNKS

    These are already in 1.2.41

The PNG_1_0_X and PNG_1_2_X macros were eliminated.

     This must wait for 1.4.0

The PNG_LEGACY_SUPPORTED macro was eliminated.

     This must wait for 1.4.0

Many WIN32_WCE #ifdefs were removed.

     This must wait for 1.4.0

PNG_MAX_UINT was replaced with PNG_UINT_31_MAX.  It has been
deprecated since libpng-1.0.16 and libpng-1.2.6.

     PNG_UINT_31_MAX is already in 1.2.x
     Removing PNG_MAX_UINT must wait for 1.4.0

The function
    png_check_sig(sig, num)
was replaced with
    !png_sig_cmp(sig, 0, num)
It has been deprecated since libpng-0.90.

The functions png_read_init(info_ptr), png_write_init(info_ptr),
png_info_init(info_ptr), png_read_destroy(), and png_write_destroy()
have been removed.  They have been deprecated since libpng-0.95.

     Removing these must wait for 1.4.0

The function
    png_set_gray_1_2_4_to_8()
which also expands tRNS to alpha was replaced with
    png_set_expand_gray_1_2_4_to_8()
which does not. It has been deprecated since libpng-1.0.18 and 1.2.9.

     png_set_expand_gray_1_2_4_to_8() is already in 1.2.x
     Removing png_set_gray_1_2_4_to_8() must wait for 1.4.0

Support for numbered error messages was removed by default, since we
never got around to actually numbering the error messages. The function
png_set_strip_error_numbers() was removed from the library by default.

     Removing this (or implementing numbered messages) must wait
     for 1.4.0

Functions png_set_benign_errors(), png_benign_error(), and
png_chunk_benign_error() were added.

     Could be added to libpng-1.2.41

Support for setting the maximum amount of memory that the application
will allocate for reading chunks was added, as a security measure.
The functions png_set_chunk_cache_max() and png_get_chunk_cache_max()
were added to the library.

     Could be added to libpng-1.2.41

We implemented support for I/O states. Added png_ptr member io_state, and
functions png_get_io_chunk_name() and png_get_io_state() in pngget.c

     Can this be added to libpng-1.2.41?

The png_permit_empty_plte() was removed. It has been deprecated
since libpng-1.0.9.  Use png_permit_mng_features() instead.

     Removing this must wait for 1.4.0

We removed the obsolete stub functions png_get_mmx_flagmask(),
png_set_mmx_thresholds(), png_get_asm_flags(),
png_get_mmx_bitdepth_threshold(), png_get_mmx_rowbytes_threshold(),
png_set_asm_flags(), and png_mmx_supported()

     Removing these must wait for 1.4.0

We removed the png_memcpy_check() and png_memset_check() functions.

     These could be removed from 1.2.x since they are not
     exported.

We changed the prototype for png_malloc() from
    png_malloc(png_structp png_ptr, png_uint_32 size)
to
    png_malloc(png_structp png_ptr, png_alloc_size_t size)

    This must wait for 1.4.0

We changed the prototypes of png_get_compression_buffer_size() and
png_set_compression_buffer_size() to work with png_size_t instead of
png_uint_32.

    This must wait for 1.4.0

The png_zalloc() function no longer zeroes out the memory that it
allocates.

    This must wait for 1.4.0

The png_zalloc() and png_zfree() functions are no longer exported.

    This must wait for 1.4.0

The png_calloc() function was added and is used in place of
of "png_malloc(); png_memset();" except in the case in png_read_png()
where the array consists of pointers; in this case a "for" loop is used
after the png_malloc() to set the pointers to NULL.

     This could be added to libpng-1.2.41

We removed the trailing '.' from the warning and error messages.

    This must wait for 1.4.0

We added PNG_TRANSFORM_GRAY_TO_RGB to the available high-level
input transforms.

     This could be added to libpng-1.2.41

The png_struct and info_struct members "trans" and "trans_values" were
changed to "trans_alpha" and "trans_color", respectively.

    I think this must wait for 1.4.0

The call to png_do_chop() in pngrtran.c, which reduces 16-bit input
files to 8-bit bit depth, was relocated ahead of the building
of gamma tables.  This allows us to build 8-bit tables instead
of 16-bit tables, when only 8-bit tables are needed. This avoids
wasting some computing resources when the application has called
the png_set_strip_16() function and encounters a 16-bit PNG file.

     I think this could be done in libpng-1.2.41

Checking for and reporting of errors in the IHDR chunk is more thorough.

     This could be done in libpng-1.2.41

      Bottom line: if I can figure a way of adding iTXt support to
      1.2.41 in an API-compatible manner, we should go ahead
      with 1.2.41 instead of pushing out 1.4.0.

      Glenn

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
png-mng-implement mailing list
png-mng-implement@...
https://lists.sourceforge.net/lists/listinfo/png-mng-implement

 « Return to Thread: Libpng-1.4.0 versus libpng-1.2.41