Skip to content
Compare
Choose a tag to compare

Fixes

  • Fixed crash with ARM NEON optimization for indexed color images
Compare
Choose a tag to compare

This release is funded by NLNet!

To support further development consider sponsoring the project on OpenCollective.

New

  • Encode support with interlacing for all bit depths and color types

  • Progressive image encoding API

  • Adaptive filtering, custom filter selection

  • Chunk write support for all standard chunks including oFFs and eXIf extensions

  • Added functions for configuring the encoder, decoder: spng_set_option(), spng_get_option()

  • Added options to configure zlib, chunk count limit and handling of unknown chunks

  • Added spng_get_gama_int(), spng_set_gama_int(), spng_decode_chunks()

  • Read and write support for unknown chunks

Decoder

  • Filter- and palette expansions optimizations using ARM NEON intrinsics, improved decode performance for common use cases:

  • ~30% faster with true color and 19% faster with indexed color images (details)

  • NEON optimizations are enabled by default on ARM64

Changes

  • Unknown chunks are now ignored by default, this can be configured with spng_set_option()

  • Introduced a default chunk count limit of 1000, this is independent of other limits

Changes - v0.7.0-rc3

  • Encoder no longer writes to an internal buffer by default, the SPNG_ENCODE_TO_BUFFER option must be set

Fixes

  • bKGD, tRNS chunk high bits are now preserved

  • Force cdecl calling convention for allocator callbacks on Windows (@danielkrupinski)

Improved

  • Expanded testsuite to verify chunk data, encoding of PNG's against libpng

  • Expanded documentation, added libpng migration guide

Compare
Choose a tag to compare

v0.7.0-rc3

Pre-release
Pre-release

This release is funded by NLNet!

This is a release candidate, the API may change for the stable release!

Share your feedback on the API here or on Gitter!

New

  • Encode support with interlacing for all bit depths and color types

  • Progressive image encoding

  • Encode to a stream, file or buffer managed by the library

  • Low overhead adaptive filtering, custom filter selection

  • Chunk write support for all standard chunks including oFFs and eXIf extensions, unknown chunks

  • ARM NEON decoder optimizations (since v0.7.0-rc2)

  • Added spng_get_png_buffer(), this function returns the encoded PNG buffer if no output stream or file is set.

  • Added functions for configuring the encoder, decoder: spng_set_option(), spng_get_option()

  • Added location field to struct spng_unknown_chunk, this specifies the relative location of the chunk (new since v0.7.0-rc1)

  • Added spng_get_gama_int(), spng_set_gama_int()

  • Added spng_encode_chunks()

Changes

  • Unknown chunks are now ignored by default, this can be configured with spng_set_option().

Fixes

  • bKGD, tRNS chunk high bits are now preserved

Improved

  • Expanded testsuite to verify chunk data, encoding of PNG's against libpng
Compare
Choose a tag to compare

v0.7.0-rc2

Pre-release
Pre-release

This release is funded by NLNet!

This is a release candidate, the API may change for the stable release!

Share your feedback on the API here or on Gitter!

New

  • Filter- and palette expansions optimizations using ARM NEON intrinsics, improved decode performance for common use cases:

  • ~30% faster with true color and 19% faster with indexed color images (details)

  • The new optimizations are enabled by default on ARM64

Compare
Choose a tag to compare

v0.7.0-rc1

Pre-release
Pre-release

This release is funded by NLNet!

This is a release candidate, the API may change for the stable release!

Share your feedback on the API here or on Gitter!

New

  • Unknown chunk read support

Bugfixes

  • Fixed spng_get_splt()
Compare
Choose a tag to compare

This release is funded by NLNet!

Improved

  • Improved decoder robustness, malformed images are less likely to cause a decoder error

  • Expanded documentation on decoder error handling

  • Expanded testsuite, code cleanups

  • Fixed MSVC warnings

Upcoming features

The next minor release is v0.7.0 and will include:

  • Unknown chunk support

  • ARM NEON optimizations

  • Encode support

Compare
Choose a tag to compare

New

  • The CRC action SPNG_CRC_DISCARD is now supported

Bugfixes

  • Fixed handling of SPNG_CTX_IGNORE_ADLER32
  • Introduced a workaround for a miniz bug that can lead to an infinite loop - #150
  • Fixed spng_get_text/splt() not reading chunks before setting n_text/n_splt

Changes

  • Dropped use of fmin() for DJGPP compatibility
  • Dropped use of #warning in favor of #pragma message
  • spng_get_<chunk>() functions will read chunks before checking all arguments

Changes to the default behavior were made for libpng compatibility:

  • Changed the default CRC action for ancillary chunks from SPNG_CRC_ERROR to SPNG_CRC_DISCARD
  • Setting SPNG_CRC_USE now also ignores checksums in DEFLATE streams
  • Ancillary chunks with zlib data errors are discarded by default
  • Ignore sBIT chunk length for truecolor alpha images - #130
  • Ignore bKGD chunk length for truecolor (alpha) images - #156

Known issues

  • Non-critical errors may still cause an image to not load - #132
Compare
Choose a tag to compare

Bugfixes

  • Fixed return value in example.c for valid images
  • Fixed MSVC build with miniz (Matthew Albrecht)
  • Fixed argument types for spng__zalloc()
  • Fixed some signedness warnings

Changes

Changes to the default behavior were made for libpng compatibility:

  • Ignore tRNS chunks for grayscale alpha / truecolor alpha images - #118
  • Do not check the text field of tEXt, zTXt chunks - #123
Compare
Choose a tag to compare

This release is backward compatible.

New

  • Progressive image decode support, added new functions:

    • spng_decode_scanline() - Decodes a single scanline
    • spng_decode_row() - Decodes and deinterlaces a scanline
    • spng_get_row_info() - Get current scanline, row information
  • Added support for reading tEXt, iTXt, zTXt and iCCP color profile chunks, all standard chunks are supported in this release.

  • Added support for building with miniz, spng.c/h and miniz.c/h can be used together without additional dependencies

  • Added output format SPNG_FMT_PNG, it represents the PNG's format in host-endian (thanks to Matthew Stadelman for initial implementation)

  • Added output format SPNG_FMT_RAW, it represents the PNG's format in big-endian (Matthew Stadelman)

  • Added output format SPNG_FMT_RGB8, conversion is supported from any color type and bit depth

  • Added grayscale output formats SPNG_FMT_G8, SPNG_FMT_GA8 and SPNG_FMT_GA16, in this release conversion is only supported from a subset of grayscale and bit depth combinations, see documentation for details

  • Added support for decoding from a FILE* with spng_set_png_file()

  • Added SPNG_CTX_IGNORE_ADLER32 context flag to ignore checksums in DEFLATE streams

  • Added enums for filter types and interlace method

  • Added Meson option use_miniz and compiler option SPNG_USE_MINIZ for building with miniz

  • Added Meson option benchmarks to run benchmarks provided by spngt, this requires Git LFS.

  • Added Meson option static_zlib to link the static version of zlib

  • Multiversioned defilter_up() function (enabled for GCC + glibc)

Changes

  • spng_decode_image() takes a void* for the output buffer (was unsigned char*)

  • Reaching chunk size- or cache limits is now handled as an out-of-memory error

  • Out-of-range palette indices are handled as black opaque pixels when decoding,
    this matches libpng's default behavior

  • PNG image row length and output row length is now limited to 2^32-1 (UINT32_MAX)

Bugfixes

  • Fixed an IDAT streaming bug (Mathieu Mallet)
  • Fixed CMake install issues
  • Fixed bKGD handling and a testsuite issue on big-endian
  • Fixed setting of PLTE presence bit (Matthew Stadelman)
  • Added missing error condition for indexed images without a palette
  • Fixed zlib constness warnings
  • Fixed ordering checks for tRNS, hIST and bKGD chunks

Known issues

  • Decoding to SPNG_FMT_G8, SPNG_FMT_GA8 and SPNG_FMT_GA16 output formats is not supported for all PNG color type and bit depth combinations, see documentation for details
  • Gamma correction is not implemented for SPNG_FMT_PNG, SPNG_FMT_G8, SPNG_FMT_GA8 and SPNG_FMT_GA16
  • spng_crc_set_action() is partially implemented, SPNG_CRC_DISCARD has no effect
Compare
Choose a tag to compare

v0.6.0-rc1

Pre-release
Pre-release

This is a release candidate, the API may change for the stable release!
Share your feedback on the API here or on Gitter!

UPDATE: This release is broken, use a0b7323 for testing progressive decode functionality with SPNG_FMT_PNG.

New features:

  • Progressive image decode support, added new functions:
    • spng_decode_scanline() - decodes a single scanline
    • spng_decode_row() - decodes and deinterlaces a scanline
    • spng_get_row_info() - get scanline/row info including the filter type
  • New output format SPNG_FMT_RGB8, conversion is supported from any color type and bit depth
  • New output format SPNG_FMT_PNG, this always matches the PNG's format in host-endian
  • Added support for decoding from a FILE* via spng_set_png_file()
  • Added SPNG_CTX_IGNORE_ADLER32 context flag to ignore checksums in DEFLATE streams
  • Enums for filter types, interlace method
  • New Meson option benchmarks to run benchmarks provided by spngt, this requires Git LFS.
  • New Meson option to link the static version of zlib: static_zlib
  • Multiversioned defilter_up() function (enabled for GCC + glibc)

Documentation:

  • Added notes on build optimization level
  • Added section on decoding arbitrary files

Bugfixes:

  • Fixed an IDAT streaming bug (Mathieu Mallet)
  • Fixed CMake install issues
  • Fixed bKGD handling and a testsuite issue on big-endian (Robert-André Mauchin)
  • Fixed setting of PLTE presence bit (Matthew Stadelman)
  • Added missing error condition for indexed images without a palette
  • Fixed zlib constness warnings
  • Fixed ordering checks for tRNS, hIST and bKGD chunks