chore: bump up Rust crate fast_image_resize to v4 #99
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:
3
->4
Release Notes
cykooz/fast_image_resize (fast_image_resize)
v4.0.0
Compare Source
Added
PixelType::size()
was made public.ImageRef
TypedImageRef
TypedImage
TypedCroppedImage
TypedCroppedImageMut
CroppedImage
CroppedImageMut
Fixed
Changed
A lot of breaking changes have been done in this release:
ImageView
andImageViewMut
have been removed. They alwaysdid unnecessary memory allocation to store references to image rows.
Instead of these structures, the
ImageView
andImageViewMut
traitshave been added. The crate accepts any image container that provides
these traits.
IntoImageView
andIntoImageViewMut
have been added.They allow you to write runtime adapters to convert your particular
image container into something that provides
ImageView
/ImageViewMut
trait.Resizer
now has two methods for resize (dynamic and typed):resize()
accepts references toimpl IntoImageView
andimpl IntoImageViewMut
;resize_typed()
accepts references toimpl ImageView
andimpl ImageViewMut
.options
argument.With the help of this argument, you can specify:
divide the destination image by the alpha channel.
By default, Resizer multiplies and divides by alpha channel
images with
U8x2
,U8x4
,U16x2
andU16x4
pixels.resize_alg
was removed fromResizer::new()
method, useoptions
argument of methods to resize instead.MulDiv
implementation has been changed in the same way asResizer
.It now has two versions of each method: dynamic and typed.
NonZeroU32
intou32
.Now you can create and use zero-sized images.
Image
(embedded implementation of image container) moved from root ofthe crate into module
images
.It adds implementation of traits
IntoImageView
andIntoImageViewMut
for theDynamicImage
type from the
image
crate. This implementation allows you to useDynamicImage
instances as arguments for methods of this crate.
Look at the difference between versions 3 and 4 on example
of resizing RGBA8 image from given u8-buffer with pixels-data.
3.x version:
4.x version:
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.