gif
GIF de- and encoder
0.14.2
122M downloads/mo
#716 most downloaded on crates.io
image-rs/image-gif
What this package is like to depend on
Last release 4 months ago
09 Apr 2026
Release timing varies
gaps range from 8 days to 1.4 years
Some releases are documented
notes for 12 of 28 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
29 releases · first in 2015
3 releases in the last 12 months
see the full history below
Release timeline
29 releases · May 2015 to Apr 2026Releases
latest 29-
0.14.209 Apr 2026Release notes
Open source →Bugfixes:
- Correctly recognize extension blocks that only have a terminator block, i.e.
are completely empty. This affects Comment as most extensions have some
minimum required data (e.g. Application Identifier, …). Such images might
have erratically failed to parse, interpreting the following block type as a
sub-block length.
Release notes
Open source →Bugfixes:
- Correctly recognize extension blocks that only have a terminator block, i.e. are completely empty. This affects Comment as most extensions have some minimum required data (e.g. Application Identifier, …). Such images might have erratically failed to parse, interpreting the following block type as a sub-block length.
- Correctly recognize extension blocks that only have a terminator block, i.e.
-
0.14.104 Dec 2025Release notes
Open source →Features:
- Added
Frame::from_grayscale_with_alphato efficiently generate a palette forLumaApixels. - Added
Decoder::current_frame_infoto re-query thenext_frame_infowithout advancing the frame.
Enhancements:
- The palette for
Frame::from_rgba_speednow handles multiple transparent
colors, i.e. non-premultiplied alpha, by normalizing fully transparent pixels
to one transparent entry. This leads to a better distributed palette.
Release notes
Open source →Features:
- Added
Frame::from_grayscale_with_alphato efficiently generate a palette forLumaApixels. - Added
Decoder::current_frame_infoto re-query thenext_frame_infowithout advancing the frame.
Enhancements:
- The palette for
Frame::from_rgba_speednow handles multiple transparent colors, i.e. non-premultiplied alpha, by normalizing fully transparent pixels to one transparent entry. This leads to a better distributed palette.
- Added
-
0.14.012 Nov 2025Release notes
Open source →EncodingErrorandDecodingErrorare now#[non_exhaustive]- Modified several error paths to return a new variant of
EncodingErrorinstead of boxing them into
anio::Error, several returnResulttypes are adjusted accordingly. - The
Decodedenum no longer communicates data from decoded sub-blocks such as the repetition count.
It now only contains the meta information on framing and extension data. This ensures we are yielding
less often for performance. last_extwas renamed tolast_extension_sub_blockfor clarity.- The
Decoderwill now collect XMP and ICC metadata subblocks, making them available after decoding.
Release notes
Open source →EncodingErrorandDecodingErrorare now#[non_exhaustive]- Modified several error paths to return a new variant of
EncodingErrorinstead of boxing them into anio::Error, several returnResulttypes are adjusted accordingly. - The
Decodedenum no longer communicates data from decoded sub-blocks such as the repetition count. It now only contains the meta information on framing and extension data. This ensures we are yielding less often for performance. last_extwas renamed tolast_extension_sub_blockfor clarity.- The
Decoderwill now collect XMP and ICC metadata subblocks, making them available after decoding.
-
0.13.323 Jun 2025Release notes
Open source →- Fix interpretation of LZW stream when multiple intermediate reset codes are used.
- Allow extension blocks of unknown type with the
allow_unknown_blocksoption.
Release notes
Open source →- Fix interpretation of LZW stream when multiple intermediate reset codes are used.
- Allow extension blocks of unknown type with the
allow_unknown_blocksoption.
-
0.13.221 Jun 2025 -
0.13.123 Jan 2024 -
0.13.022 Jan 2024Release notes
Open source →Features:
- Added
Iteratorinterface for theDecoder - Added reading number of loop repetitions
Decoder::repeat. - Added
skip_frame_decodingoption to readFrame.bufferas LZW data. It works together withwrite_lzw_pre_encoded_framefor quick rewriting of GIF files. - Added support pre-allocated
Vecs infrom_palette_pixels - Added ability to recover the
io::Reader after decoding. - Added support for decompressing
Frame.bufferwith LZW data, which enables fully parallel GIF re-encoding (see examples/parallel.rs),
Optimization:
- Less buffering, copying, and lower peak memory usage.
Other changes:
- Removed
unsafe {}code. - Enforced memory limit also on metadata extension blocks, and added out-of-memory checks where possible.
EncodingFormatErrorenum is public.- Removed defunct
skip_extensions - Added validation of frame dimensions. The buffer must be large enough for all pixels, and if the width or height is 0, the buffer must be empty.
- Added
-
0.13.0-beta.115 Jan 2024 pre-releaseNothing published for this version
-
0.12.017 Nov 2022Release notes
Open source →Features:
- Add compression of pre-compressed frame data, via
Encoder::write_lzw_pre_encoded_frame. - The
color_quantdependency is now optional. Turning it off disables some
interfaces that would internally build quantization tables. The generic
implementation of creating such tables can be prohibitively costly compared
to specialized algorithms in some use cases.
Optimization:
- Avoid some allocations in by replacing
flat_mapargument with arrays
sha256sum: 80792593675e051cf94a4b111980da2ba60d4a83e43e0048c5693baab3977045 target/package/gif-0.12.0.crate
Release notes
Open source →Features:
- Add compression of pre-compressed frame data, via
Encoder::write_lzw_pre_encoded_frame. - The
color_quantdependency is now optional. Turning it off disables some interfaces that would internally build quantization tables. The generic implementation of creating such tables can be prohibitively costly compared to specialized algorithms in some use cases.
Optimization:
- Avoid some allocations in by replacing
flat_mapargument with arrays
- Add compression of pre-compressed frame data, via
-
0.11.427 Jun 2022Release notes
Open source →Bufixes:
- Fix decoding confusing superfluous image data from previous frames with
current frame data. - Bump minimum required version of
weezl.
Features:
- Add
Encoder::{get_ref, get_mut, into_inner}to access underlying stream.
Release notes
Open source →Bufixes:
- Fix decoding confusing superfluous image data from previous frames with current frame data.
- Bump minimum required version of
weezl.
Features:
- Add
Encoder::{get_ref, get_mut, into_inner}to access underlying stream.
- Fix decoding confusing superfluous image data from previous frames with
-
0.11.314 Oct 2021Release notes
Open source →Bugfixes:
- Fix panic while decoding some images, has no precise cause in the file.
- Warn about
set_extensionsbeing unimplemented...
Features:
- Added
StreamingDecoder::versionto query the precise version of the
standard used for encoding the file. This is merely a hint. - Added
DecodeOptions::allow_unknown_blocksto skip over unknown or
unspecified block kinds.
Optimization:
Frame::from_rgbanow recognizes when less than 256 colors are being used,
dynamically skipping the quantization phase.- Encoding image chunks is faster and simpler
Release notes
Open source →Bugfixes:
- Fix panic while decoding some images, has no precise cause in the file.
- Warn about
set_extensionsbeing unimplemented...
Features:
- Added
StreamingDecoder::versionto query the precise version of the standard used for encoding the file. This is merely a hint. - Added
DecodeOptions::allow_unknown_blocksto skip over unknown or unspecified block kinds.
Optimization:
Frame::from_rgbanow recognizes when less than 256 colors are being used, dynamically skipping the quantization phase.- Encoding image chunks is faster and simpler
-
0.11.222 Mar 2021Release notes
Open source →- Fix panic when LZW code size is invalid
- Added option to omit check for lzw end code
sha256sum:
5a668f699973d0f573d15749b7002a9ac9e1f9c6b220e7b165601334c173d8de target/package/gif-0.11.2.crateRelease notes
Open source →- Fix panic when LZW code size is invalid
- Added option to omit check for lzw end code
-
0.11.125 Sep 2020Release notes
Open source →- Frames out-of-bounds of the screen descriptor are again accepted by default.
- Added
DecodeOptions::check_frame_consistencyto turn this validation on.
-
0.11.020 Sep 2020Nothing published for this version
-
0.10.318 Sep 2019Nothing published for this version
-
0.10.201 Jun 2019Nothing published for this version
-
0.10.102 Oct 2018Nothing published for this version
-
0.10.015 Apr 2018Nothing published for this version
-
0.9.211 Jun 2017Nothing published for this version
-
0.9.124 Feb 2017Nothing published for this version
-
0.9.006 Jun 2016Nothing published for this version
-
0.8.028 Feb 2016Nothing published for this version
-
0.7.012 Dec 2015Nothing published for this version
-
0.6.009 Nov 2015Nothing published for this version
-
0.5.114 Oct 2015Nothing published for this version
-
0.5.005 Jun 2015Nothing published for this version
-
0.4.130 May 2015Nothing published for this version
-
0.4.030 May 2015Nothing published for this version
-
0.3.029 May 2015Nothing published for this version