This repository has been archived by the owner on Mar 17, 2023. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.23.3
->0.24.5
Release Notes
image-rs/image
v0.24.5
Compare Source
Structural changes:
tiff
crate to 0.8.0.jpeg
crate to 0.3.0.Bug fixes:
as_rgb32f
function ofDynamicImage
is now correctly documented.images. The missing check could panic in debug mode or else set an incorrect
file size in release mode.
PngEncoder::write_image
instead of the deprecated
PngEncoder::encode
which did not account for byteorder and could result in images with incorrect colors.
InsufficientMemory
error when trying to decode a PNG image.Performance:
performance in cases where the image does not need to be resized or has
already been resized.
v0.24.4
Compare Source
New Features:
webp
is now available with the native library. This needs tobe activate explicitly with the
web-encoder
feature.exr
decoding has gained basic limit support.Bug fixes:
Iterator::size_hint
implementation of pixel iterators has been fixed toreturn the current length indicated by its
ExactSizeIterator
hint.Performance:
ImageBuffer::get_pixel{,_mut}
is now marked inline.resize
now short-circuits when image dimensions are unchanged.v0.24.3
Compare Source
New Features:
TiffDecoder
now supports setting resource limits.Bug fixes:
v0.24.2
Structural changes:
cargo-deny
, checking dependent crates to an OSS license listand against RUSTSEC advisories.
New Features:
VP8X
header.DX10
headers.Bug fixes:
DynamicImage
/ImageBuffer
's methodswrite_to
andsave
will nowwork properly even if the backing container is larger than the image layout
requires. Only the relevant slice of pixel data is passed to the encoder.
gif
decoder.v0.24.1
Bug Fixes:
v0.24.0
Compare Source
Breaking changes
Structural changes:
1.56
and may change in minor versions untilfurther notice. It is now tracked in the library's
Cargo.toml
, instead, bythe standard
[package.rust-version]
field. Note: this applies to thelibrary itself. You may need different version resolutions for dependencies
when using a non-stable version of Rust.
math::utils::{nq, utils}
modules have been removed. These are betterserved through the
color_quant
crate and the standard library respectively.image::codecs
, no longer top-level.ExtendedColorType
andDynamicImage
have been made#[non_exhaustive]
,providing more methods instead of exhaustive matching.
io::Reader
, as well as genericconvenience interfaces, now requires the underlying reader to be
BufRead + Seek
. This allows more efficient support more formats. Similarly, writingnow requires writers to be
Write + Seek
.Bgra*
variants of buffers, which were only half-supported, have beenremoved. The owning buffer types
ImageBuffer
andDynamicImage
fundamentally already make a choice in supported pixel representations. This
allows for more consistent internal behavior. Callers are expected to convert
formats when using those buffers, which they are required to do in any case
already, and which is routinely performed by decoders.
Trait reworks:
Pixel
trait is no longer implemented quite as liberally for structsdefined in the crate. Instead, it is now restricted to a set of known channel
which ensures accuracy in computations involving those channels.
ImageDecoderExt
trait has been renamed toImageDecoderRect
, accordingto its actual functionality.
Pixel
trait and itsSubpixel
field no longer require (or provide) a'static
lifetime bound.Pixel
trait no longer requires specifying an associated, constantColorType
. This was of little relevance to computation but made it muchharder to implement and extend correctly. Instead, the private
PixelWithColorType
extension is added for interfaces that require aproperly known variant.
SubImage
interacts with theGenericImage
trait. It is now adefault implementation. Note that
SubImage
now has inherent methods thatavoid double-indirection, the trait's method will no longer avoid this.
Primitive
trait now requires implementations to provide a minimum andmaximum logical bound for the purpose of converting to other primitive
representations.
Additions
Image formats:
jpeg
decoder has been upgraded to Lossless JPEG.AvifEncoder
now correctly handles alpha-less images. Some additionalcolor formats are converted to RGBA as well.
Bmp
codec now decodes more valid images. It can decode a raw imagewithout performing the palette mapping. It provides a method to access the
palette. The encoder provides the inverse capabilities.
Tiff
is now an output format.Buffers and Operations:
f32
is now supported. Currently only theOpenEXR codec makes full use of it but this is expected to change.
ImageBuffer::{get_pixel_checked, get_pixel_mut_checked}
provide panic-freeaccess to pixels and channels by returning
Option<&P>
andOption<&mut P>
.ImageBuffer::write_to
has been added, encoding the buffer to a writer. Thismethod already existed on
DynamicImage
.DynamicImage
now implementsFrom<_>
for all supported buffer types.DynamicImage
now implementsDefault
, an emptyRgba8
image.imageops::overlay
now takes coordinates asi64
.Limits:
Limits
andLimitSupport
, utilized inio::Reader
. These can beconfigured for rudimentary protection against resource exhaustion (images
pretending to require a very large buffer). These types are not yet
exhaustive by design, and more and stricter limits may be added in the
future.
significant amount of internal memory, are urged to implement the
set_limits
extension toImageDecoder
. Some strict limit are opt-in, whichmay cause decoding to fail if not supported.
Miscellaneous:
PNMSubtype
has been renamed toPnmSubtype
, by Rust's naming scheme.PNM*
aliases have been removed.enum
types that had previously used a hidden variant now use theofficial
#[non_exhaustive]
attribute instead.v0.23.14
Compare Source
Unified gif blending in different decode methods, fixing out-of-bounds checks
in a number of weirdly positioned frames.
Hardened TGA decoder against a number of malicious inputs.
Fix forward incompatible usage of the panic macro.
Fix load_rect for gif reaching
unreachable!()
code.Added
ExtendedColorType::A8
.Allow TGA to load alpha-only images.
Optimized load_rect to avoid unnecessary seeks.
v0.23.13
Compare Source
Fix an inconsistency in supported formats of different methods for encoding
an image.
Fix
thumbnail
choosing an empty image. It now always prefer non-empty imagedimensions.
Fix integer overflow in calculating requires bytes for decoded image buffers
for farbfeld, hdr, and pnm decoders. These will now error early.
Fix a panic decoding certain
jpeg
image without frames or meta data.Optimized the
jpeg
encoder.Optimized
GenericImage::copy_from
default impl in various cases.Add
avif
decoders. You must enable it explicitly and it is not covered byour usual MSRV policy of Rust 1.34. Instead, only latest stable is supported.
Add
ImageFormat::{can_read, can_write}
Add
Frame::buffer_mut
Add speed and quality options on
avif
encoder.Add speed parameter to
gif
encoder.Expose control over sequence repeat to the
gif
encoder.Add
{contrast,brighten,huerotate}_in_place
functions in imageproc.Relax
Default
impl ofImageBuffer
, removing the bound on the color type.Derive Debug, Hash, PartialEq, Eq for DynamicImage
v0.23.12
Compare Source
Fix a soundness issue affecting the impls of
Pixel::from_slice_mut
. Thiswould previously reborrow the mutable input reference as a shared one but
then proceed to construct the mutable result reference from it. While UB
according to Rust's memory model, we're fairly certain that no miscompilation
can happen with the LLVM codegen in practice.
See
5cbe1e6
for more details.Fix
imageops::blur
panicking whensigma = 0.0
. It now defaults to1.0
as all negative values.
Fix re-exporting
png::{CompressionType, FilterType}
to maintain SemVercompatibility with the
0.23
releases.Add
ImageFormat::from_extension
Add copyless DynamicImage to byte slice/vec conversion.
Add bit-depth specific
into_
andto_
DynamicImage conversion methods.v0.23.11
Compare Source
NeuQuant
implementation is now supplied bycolor_quant
. Use of thetype defined by this library is discouraged.
jpeg
decoder can now downscale images that are decoded by 1,2,4,8.clamp
function. Usenum-traits
instead.ImageOutputFormat
forAVIF
tiff
to0.6
with lzw performance improvements.v0.23.10
Compare Source
ravif
crate. Please note thatthe feature targets the latest stable compiler and is not enabled by default.
ImageBuffer::as_raw
to inspect the underlying container.gif
to0.11
with large performance improvements.v0.23.9
Compare Source
imageops::{vertical_gradient, horizontal_gradient}
for writingsimple color gradients into an image.
Pixels
,PixelsMut
, etc. by using exactchunks internally. This should auto-vectorize
ImageBuffer::from_pixel
.Clone
impls of iterators to not require a bound on the pixel.Debug
impls for iterators where the pixel's channel implements it.FilterType
v0.23.8
Compare Source
flat::Error
now implements the standardError
traitMap
has been relaxed to?Sized
imageops::tile
function that repeats one image across anotherv0.23.7
Compare Source
ImageBuffer
can now be clonedtga
encoderColorMap::lookup
, an optional reversal of the mapEncodableLayout
trait is now exportedv0.23.6
Compare Source
png::ApngDecoder
, an adapter decoding the animation in an APNG.jpeg
encoding that would darken output colors.FlatSamples::with_monocolor
.ImageBuffer::as_flat_samples_mut
which is a mutable variant of theexisting ffi-helper
ImageBuffer::as_flat_samples
.v0.23.5
Compare Source
png
encoder now allows configuring compression and filter type. Theoutput is not part of stability guarantees, see its documentation.
jpeg
encoder now accepts any implementor ofGenericImageView
. Thisallows images that are only partially present in memory to be encoded.
ImageBuffer
now derivesHash
,PartialEq
,Eq
.Pixels
/PixelsMut
iterator no longer yields out-of-bounds pixels whenthe underlying buffer is larger than required.
pbm
decoder correctly decodes ascii data again, fixing a regressionwhere it would use the sample value
1
as white instead of255
.gif
frames.Rows
/RowsMut
iterator no longer panics when the image hasa width or height of
0
.v0.23.4
Compare Source
crop_imm
which functions likecrop
but on a shared referenceDisposalMethod::Any
is treated asKeep
, consistent with browsersError::source
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.