PackageTrack
Sign in Get early access

png

PNG decoding and encoding library in pure Rust

0.18.1 202M downloads/mo #504 most downloaded on crates.io image-rs/image-png

What this package is like to depend on

Last release 6 months ago

14 Feb 2026

Release timing varies

gaps range from 2 weeks to 7 months

Some releases are documented

notes for 29 of 56 stable releases

1 version withdrawn

withdrawn after publishing

11 years old

61 releases · first in 2015

2 releases in the last 12 months

see the full history below

Release timeline

61 releases · May 2015 to Feb 2026
2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release Withdrawn

Releases

latest 60 of 61
  1. 0.18.1 14 Feb 2026
    Release notes

    Additions

    • Added Filter::MinEntropy for encoding, which selects the filter that minimizes the Shannon entropy of the filtered row. (#647)
    • Made ScaledFloat::SCALING constant public. (#650)
    • Support skipping chunks without loading them into memory. (#630)
    • Allow full unfiltering for partial data, enabling progressive decoding use cases. (#664)

    Changes

    • Improved Paeth unfilter auto-vectorization by changing how loop state is maintained. (#635)
    • Added portable_simd Paeth unfiltering for 3bpp and 4bpp images on nightly. (#632, #633)
    • Add early exit for adaptive filter selection when a perfect filter is found. (#646)
    • Ignore duplicate acTL chunks instead of producing errors. (#651)
    • Require IDAT chunk(s) before fdAT chunks, as mandated by PNG specification. (#653)
    • Enforce acTL frame counts to be valid PNG 4-byte integers (capped at 2^31-1). (#673)

    Fixes

    • Fixed and improved intra-doc links in documentation comments. (#665)
    • Fixed nightly portable_simd build. (#675)
    Open source →
  2. 0.18.0 29 Aug 2025
    Release notes

    API Breaking Changes

    • Removed deprecated Info::encode and Encoder::set_srgb methods.
    • Improved the compression settings API for encoding.
    • Decoder now requires a reader that implements Seek and BufRead traits.
    • Bump bitflags dependency to 2.0.
    • StreamingDecoder::update now takes a structured UnfilterBuf argument instead of a direct reference to a vector. This allows in-place decompression. There is a public constructor for UnfilterBuf.
    • The methods Decoder::output_buffer_size and output_line_size now return Option<usize> to reflect that these calculations no longer overflow on some targets where the required buffers can not be represented in the address space. They return the mathematically correct size where possible.
    • The Decoded enum returned from StreamingDecoder::update was simplified to no longer contains any chunk payload data. Instead, it now contains only chunk events where every chunk that was started will eventually be ended by ChunkComplete, BadAncillaryChunk or SkippedAncillaryChunk.
    • Ancillary chunks, i.e. those not critical to decoder interpretation of the file, which fail to parse are now terminated with a BadAncillaryChunk event but no longer returned a DecodingError. This includes text chunks as well as many metadata chunks (except for fcTL that we deem crucial to the parser's understanding of the image sequence in an APNG despite being technically ancillary).

    Additions

    • Added Reader::read_row method.
    • Add support for parsing eXIf chunk.
    • Treat most auxiliary chunk errors as benign.
    • Added splat_interlaced_row, which implements an alternative method for merging Adam7 interlaced lines into the output buffer that is more suitable for the presentation of progressive states of the buffer.
    • Added Adam7Variant documenting the various methods for applying interlaced rows and to prepare an API to progressively read frames through Decoder.

    Changes

    • The decoding of Adam7 interlaced data is now much faster.
    • The acTL chunk is now ignored when it is invalid, instead of producing errors while reading or decoding the following APNG chunks.
    • The requirement of the fcTL chunk for the default image to match the IHDR's indicate image size is now enforced.
    • More minor format errors in auxiliary chunks are now ignored by the decoder, instead disregarding the malformed chunk.
    • Adam7 Interlacing on 32-bit targets now handles some cases correctly that previously wrote some bytes to the wrong pixel indices due to overflows.
    Open source →
  3. 0.18.0-rc.3 02 Jul 2025 pre-release
    Release notes

    Cumulative to the last 0.17 release

    • Removed deprecated Info::encode and Encoder::set_srgb methods.

    • Improved the compression settings API for encoding.

    • Decoder now requires a reader that implements Seek and BufRead traits.

    • Bump bitflags dependency to 2.0.

    • StreamingDecoder::update now takes a structured UnfilterBuf argument
      instead of a direct reference to a vector. This allows in-place
      decompression. There is a public constructor for UnfilterBuf.

    • The methods Decoder::output_buffer_size and output_line_size now return
      Option<usize> to reflect that these calculations no longer overflow on some
      targets where the required buffers can not be represented in the address
      space. They return the mathematically correct size where possible.

    • Added Reader::read_row method.

    • Add support for parsing eXIf chunk.

    • Treat most auxiliary chunk errors as benign.

    • Added splat_interlaced_row, which implements an alternative method for
      merging Adam7 interlaced lines into the output buffer that is more suitable
      for the presentation of progressive states of the buffer.

    • Added Adam7Variant documenting the various methods for applying interlaced
      rows and to prepare an API to progressively read frames through Decoder.

    • The decoding of Adam7 interlaced data is now much faster.

    • The acTL chunk is now ignored when it is invalid, instead of producing
      errors while reading or decoding the following APNG chunks.

    • The requirement of the fcTL chunk for the default image to match the IHDR's
      indicate image size is now enforced.

    • More minor format errors in auxiliary chunks are now ignored by the decoder,
      instead disregarding the malformed chunk.

    • Adam7 Interlacing on 32-bit targets now handles some cases correctly that
      previously wrote some bytes to the wrong pixel indices due to overflows.

    Open source →
  4. 0.18.0-rc.2 10 Jun 2025 pre-release

    Nothing published for this version

  5. 0.18.0-rc 03 Mar 2025 pre-release

    Nothing published for this version

  6. 0.17.16 20 Dec 2024
    Release notes
    • Make gAMA and cHRM fallback optional for sRGB (#547)
    • Pass through nightly feature to crc32fast crate to get SIMD crc32 on Aarch64 (#545)
    • Fix bug in iCCP chunk encoding (#458)
    • Deprecate Info::encode (#550)
    Open source →
  7. 0.17.15 07 Dec 2024
    Release notes

    Added

    • Add a public API to advance to the next frame in APNG decoder (#518)
    • Add APIs to write ICC and EXIF chunks (#526)
    • Add support for parsing the sBIT chunk (#524)
    • Add support for parsing the bKGD chunk (#538)
    • Add support for parsing the cICP chunk (#529)
    • Add support for parsing mDCV and cLLI chunks (#528, (#543))

    Changed

    • Improve performance of Paeth filter during decoding (#512, #539)

    Fixed

    • Avoid an infinite loop when retrying after a fatal error using StreamingDecoder (#520)
    • Fixed chunk order in encoded files (#526)
    Open source →
  8. 0.17.14 27 Sep 2024
    Release notes
    • Updated to miniz_oxide 0.8.0.
    • Added public API to consume interlaced rows one by one (#495)
    • Improved support for resuming decoding after an UnexpectedEof, which lets you start parsing a file before it's fully received over the network (#496)
    • Fixed some broken links in documentation, improved some documentation comments
    Open source →
    Release notes
    • Updated to miniz_oxide 0.8.0.
    • Added public API to consume interlaced rows one by one (#495)
    • Improved support for resuming decoding after an UnexpectedEof, which lets you start parsing a file before it's fully received over the network (#496)
    • Fixed some broken links in documentation, improved some documentation comments
    Open source →
  9. 0.17.13 19 Feb 2024
    Release notes

    Release 0.17.13 (#472)

    Open source →
    Release notes
    • Fix Send bound on Reader.
    Open source →
  10. 0.17.12 16 Feb 2024 withdrawn
    Release notes

    Release 0.17.12 (#468)

    Open source →
    Release notes
    • Reject zero-sized frames.
    • Optimized decoding of paletted images.
    • Removed remaining uses of miniz_oxide for decoding.
    • Correct lifetime used for Info struct.
    • Fix build issue with -Z minimal-versions.
    Open source →
  11. 0.17.11 13 Jan 2024
    Release notes

    Release 0.17.11 (#455)

    Open source →
    Release notes
    • Ignore subsequent iCCP chunks to match libpng behavior.
    • Added an option to ignore ancillary chunks with invalid CRC.
    • Added new_with_info constructor for encoder.
    • Removed hard-coded memory limits.
    • No longer allow zero sized images.
    • Added Reader::finish to read all the auxiliary chunks that comes after the image.
    Open source →
  12. 0.17.10 18 Aug 2023
    Release notes
    • Added Transformations::ALPHA
    • Enable encoding pixel dimensions
    Open source →
  13. 0.17.9 10 Jun 2023
    Release notes
    • Fixed a bug in ICC profile decompression.
    • Improved unfilter performance.
    Open source →
  14. 0.17.8 11 Apr 2023
    Release notes
    • Increased MSRV to 1.57.0.
    • Substantially optimized encoding and decoding:
      • Autovectorize filtering and unfiltering.
      • Make the "fast" compression preset use fdeflate.
      • Switch decompression to always use fdeflate.
      • Updated to miniz_oxide 0.7.
      • Added an option to ignore checksums.
    • Added corpus-bench example which measures the compression ratio and time to re-encode and subsequently decode a corpus of images.
    • More fuzz testing.
    Open source →
  15. 0.17.8-rc 21 Mar 2023 pre-release

    Nothing published for this version

  16. 0.17.7 30 Oct 2022
    Release notes
    • Fixed handling broken tRNS chunk.
    • Updated to miniz_oxide 0.6.
    Open source →
  17. 0.17.6 05 Sep 2022
    Release notes
    • Added Decoder::read_header_info to query the information contained in the PNG header.
    • Switched to using the flate2 crate for encoding.
    Open source →
  18. 0.17.5 02 Mar 2022
    Release notes
    • Fixed a regression, introduced by chunk validation, that made the decoder sensitive to the order of gAMA, cHRM, and sRGB chunks.
    Open source →
  19. 0.17.4 26 Feb 2022
    Release notes
    • Added {Decoder,StreamDecoder}::set_ignore_text_chunk to disable decoding of ancillary text chunks during the decoding process (chunks decoded by default).
    • Added duplicate chunk checks. The decoder now enforces that standard chunks such as palette, gamma, … occur at most once as specified.
    • Added #[forbid(unsafe_code)] again. This may come at a minor performance cost when decoding ASCII text for now.
    • Fixed a bug where decoding of large chunks (>32kB) failed to produce the correct result, or fail the image decoding. As new chunk types are decoded this introduced regressions relative to previous versions.
    Open source →
  20. 0.17.3 12 Feb 2022
    Release notes
    • Fixed a bug where Writer::finish would not drop the underlying writer. This would fail to flush and leak memory when using a buffered file writers.
    • Calling Writer::finish will now eagerly flush the underlying writer, returning any error that this operation may result in.
    • Errors in inflate are now diagnosed with more details.
    • The color and depth combination is now checked in stream decoder.
    Open source →
  21. 0.17.2 08 Oct 2021
    Release notes
    • Added support for encoding and decoding tEXt/zTXt/iTXt chunks.
    • Added Encoder::validate_sequence to enable validation of the written frame sequence, that is, if the number of written images is consistent with the animation state.
    • Validation is now off by default. The basis of the new validation had been introduced in 0.17 but this fixes some cases where this validation was too aggressive compared to previous versions.
    • Added Writer::finish to fully check the write of the end of an image instead of silently ignoring potential errors in Drop.
    • The Writer::write_chunk method now validates that the computed chunk length does not overflow the limit set by PNG.
    • Fix an issue where the library would panic or even abort the process when flush or write of an underlying writer panicked, or in some other uses of StreamWriter.
    Open source →
  22. 0.17.1 29 Aug 2021
    Release notes
    • Fix panic in adaptive filter method sum_buffer
    Open source →
  23. 0.17.0 14 Aug 2021
    Release notes
    • Increased MSRV to 1.46.0
    • Rework output info usage
    • Implement APNG encoding
    • Improve ergonomics of encoder set_palette and set_trns methods
    • Make Info struct non-exhaustive
    • Make encoder a core feature
    • Default Transformations to Identity
    • Add Adaptive filtering method for encoding
    • Fix SCREAM_CASE on ColorType variants
    • Forbid unsafe code
    Open source →
  24. 0.16.8 08 Dec 2020

    Nothing published for this version

  25. 0.16.7 18 Jul 2020
    Release notes
    • Added Encoder::set_trns to register a transparency table to be written.
    Open source →
  26. 0.16.6 27 Jun 2020
    Release notes
    • Fixed silent integer overflows in buffer size calculation, resulting in panics from assertions and out-of-bounds accesses when actually decoding. This improves the stability of 32-bit and 16-bit targets and make decoding run as stable as on 64-bit.
    • Reject invalid color/depth combinations. Some would lead to mismatched output buffer size and panics during decoding.
    • Add Clone impl for Info struct.
    Open source →
  27. 0.16.5 13 Jun 2020
    Release notes
    • Decoding of APNG subframes is now officially supported and specified. Note that dispose ops and positioning in the image need to be done by the caller.
    • Added encoding of indexed data.
    • Switched to miniz_oxide for decompressing image data, with 30%-50% speedup in common cases and up to 200% in special ones.
    • Fix accepting images only with consecutive IDAT chunks, rules out data loss.
    Open source →
  28. 0.16.4 01 Jun 2020
    Release notes
    • The fdAT frames are no longer inspected when the main image is read. This would previously be the case for non-interlaced images. This would lead to incorrect failure and, e.g. an error of the form "invalid filter method".
    • Fix always validating the last IDAT-chunks checksum, was sometimes ignored.
    • Prevent encoding color/bit-depth combinations forbidden by the specification.
    • The fixes for APNG/fdAT enable further implementation. The next release is expected to officially support APNG.
    Open source →
  29. 0.16.3 18 Apr 2020
    Release notes
    • Fix encoding with filtering methods Up, Avg, Paeth
    • Optimize decoding throughput by up to +30%
    Open source →
  30. 0.16.2 02 Apr 2020
    Release notes
    • Added method constructing an owned stream encoder.
    Open source →
  31. 0.16.1 03 Mar 2020
    Release notes
    • Addressed files bloating the packed crate
    Open source →
  32. 0.16.0 01 Mar 2020
    Release notes
    • Fix a bug compressing images with deflate
    • Address use of deprecated error interfaces
    Open source →
  33. 0.15.3 07 Jan 2020
    Release notes
    • Fix panic while trying to encode empty images. Such images are no longer accepted and error when calling write_header before any data has been written. The specification does not permit empty images.
    Open source →
  34. 0.15.2 03 Dec 2019
    Release notes
    • Fix EXPAND transformation to leave bit depths above 8 unchanged
    Open source →
  35. 0.15.1 17 Nov 2019
    Release notes
    • Fix encoding writing invalid chunks. Images written can be corrected: see https://github.com/image-rs/image/issues/1074 for a recovery.
    • Fix a panic in bit unpacking with checked arithmetic (e.g. in debug builds)
    • Added better fuzzer integration
    • Update term, rand dev-dependency
    • Note: The show example program requires a newer compiler than 1.34.2 on some targets due to depending on glium. This is not considered a breaking bug.
    Open source →
  36. 0.15.0 18 Jul 2019

    Nothing published for this version

  37. 0.14.1 24 Apr 2019

    Nothing published for this version

  38. 0.14.0 11 Jan 2019

    Nothing published for this version

  39. 0.13.2 28 Nov 2018

    Nothing published for this version

  40. 0.13.1 19 Oct 2018

    Nothing published for this version

  41. 0.13.0 02 Oct 2018

    Nothing published for this version

  42. 0.12.0 24 Apr 2018

    Nothing published for this version

  43. 0.11.0 13 Oct 2017

    Nothing published for this version

  44. 0.10.0 23 Sep 2017

    Nothing published for this version

  45. 0.9.0 25 Jun 2017

    Nothing published for this version

  46. 0.8.0 12 Jun 2017

    Nothing published for this version

  47. 0.7.0 27 Apr 2017

    Nothing published for this version

  48. 0.6.2 09 Jan 2017

    Nothing published for this version

  49. 0.6.1 09 Jan 2017

    Nothing published for this version

  50. 0.6.0 06 Jan 2017

    Nothing published for this version

  51. 0.5.2 30 Jul 2016

    Nothing published for this version

  52. 0.5.1 16 May 2016

    Nothing published for this version

  53. 0.5.0 04 May 2016

    Nothing published for this version

  54. 0.4.3 29 Apr 2016

    Nothing published for this version

  55. 0.4.2 12 Mar 2016

    Nothing published for this version

  56. 0.4.1 29 Dec 2015

    Nothing published for this version

  57. 0.4.0 10 Nov 2015

    Nothing published for this version

  58. 0.3.1 15 Jun 2015

    Nothing published for this version

  59. 0.3.0 08 Jun 2015

    Nothing published for this version

  60. 0.2.0 26 May 2015

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive