Skip to content

Update image dependency from 0.23 to 0.24 #333

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

Merged
merged 4 commits into from
Feb 21, 2022

Conversation

kirdaybov
Copy link
Contributor

When building our repository that depends on gltf we found out that it is not using the last image crate. We would appreciate if the dependency could be brought up to date.

DynamicImage::ImageLuma16(_) => Format::R16,
DynamicImage::ImageLumaA16(_) => Format::R16G16,
DynamicImage::ImageRgb16(_) => Format::R16G16B16,
DynamicImage::ImageRgba16(_) => Format::R16G16B16A16,
DynamicImage::ImageRgb32F(_) => Format::R32G32B32FLOAT,
DynamicImage::ImageRgba32F(_) => Format::R32G32B32A32FLOAT,
_ => unreachable!("Unmatched DynamicImage format"),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

enum DynamicImage is #[non_exhaustive] since 0.24

@IcanDivideBy0 IcanDivideBy0 merged commit 3a5d8a9 into gltf-rs:master Feb 21, 2022
@IcanDivideBy0
Copy link
Collaborator

Thank you!
We should avoid panics when possible, i've added proper error handling in #344.
Since this is private API we don't need a major release to handle the change

Comment on lines -148 to -149
DynamicImage::ImageBgr8(_) => Format::B8G8R8,
DynamicImage::ImageBgra8(_) => Format::B8G8R8A8,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why have these cases been removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They have been removed from the DynamicImage of the image crate. You can take a look at the corresponding discussions image-rs/image#1482 image-rs/image#1671

@emilk emilk mentioned this pull request Aug 19, 2022
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