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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

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:

- 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
@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.

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.

2 participants