Skip to content

Conversation

@rayguo17
Copy link
Contributor

@rayguo17 rayguo17 commented Jan 5, 2026

In c898457, we change to encoder in jpeg_encoder instead of our own implementation, this PR add more ExtendedColorType that is supported in jpeg_encoder crate, but is previously not supported by our own implementation.

Signed-off-by: rayguo17 <rayguo17@gmail.com>
let color = jpeg_encoder::ColorType::Rgb;
encode_jpeg(color)
}
ExtendedColorType::Rgba8 => {
Copy link
Contributor

Choose a reason for hiding this comment

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

The JPEG encoder should not claim to support color types with alpha channels and then silently drop them.

See the note here: https://docs.rs/image/0.25.9/image/enum.DynamicImage.html#color-conversion

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