Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump image from 0.24.9 to 0.25.2 #1396

Merged
merged 3 commits into from
Nov 10, 2024
Merged

Bump image from 0.24.9 to 0.25.2 #1396

merged 3 commits into from
Nov 10, 2024

Conversation

musicinmybrain
Copy link
Contributor

Breaking changes from 0.24 to 0.25 are described in https://github.com/image-rs/image/blob/main/CHANGES.md#version-0250.

This PR includes the following changes to adapt to image 0.25:

@musicinmybrain musicinmybrain requested a review from yoichi as a code owner August 18, 2024 14:56
@spenserblack
Copy link
Collaborator

Can we disable default features? This is bringing in a lot of new dependencies and I'm not sure if we need them all.

@musicinmybrain
Copy link
Contributor Author

Can we disable default features? This is bringing in a lot of new dependencies and I'm not sure if we need them all.

Sure, that’s feasible.

As of 0.24.9, the default features were:

default = ["gif", "jpeg", "ico", "png", "pnm", "tga", "tiff", "webp", "bmp", "hdr", "dxt", "dds", "farbfeld", "jpeg_rayon", "openexr", "qoi"]

As of 0.25.2, they are

default = ["rayon", "default-formats"]
default-formats = ["avif", "bmp", "dds", "exr", "ff", "gif", "hdr", "ico", "jpeg", "png", "pnm", "qoi", "tga", "tiff", "webp"]
avif = ["dep:ravif", "dep:rgb"]

So what I notice, looking at the above and at the diff image-rs/image@v0.24.9...v0.25.2#diff-2e9d962a08321605940b5a657135052fbcef87b5e360662bb527c96d9a615542L63, I notice:

  • avif was added to the default features, bringing in the ravif crate (which has some new dependencies like loop9, imgref, avif-serialize, rav1e)
  • the jpeg_rayon feature is gone and jpeg now brings in zune-core and zune-jpeg – nothing to be done about this if you need JPEG support
  • rayon was added to the default features, which enables multithreading

It seems like rayon is worthwile, because this is likely to speed up loading of images and therefore perceived responsiveness. The biggest way you could prune the dependency tree would be by omitting support for the AVIF format. I’ll add that to this PR. Let me know what you think.

Cargo.toml Outdated Show resolved Hide resolved
musicinmybrain and others added 3 commits November 10, 2024 15:10
- Replace `ImageOutputFormat`, previously deprecated and removed in
  0.25, with `ImageFormat`
- Require the `color_quant` crate feature
  (for `impl ColorMap for NeoQuant`)

See: https://github.com/image-rs/image/blob/main/CHANGES.md#version-0250
Co-authored-by: Ossama Hjaji <ossama-hjaji@live.fr>
@musicinmybrain
Copy link
Contributor Author

Rebased on main with the image crate features reduced as suggested.

@o2sh o2sh merged commit cd66f36 into o2sh:main Nov 10, 2024
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants