Open voratham opened 5 months ago
The JPEG file format doesn't support alpha, but your image has an alpha channel. You can either remove the alpha channel (via to_rgb8
) or use a different file format that does support alpha. Previous versions of this library used to silently drop the alpha channel
does anybody know how to handle this when opening an image file?
there are crazy maniacs who has rgba8 in JPEG image header
@hwkim1127 That sounds like a different problem. You may want to open a dedicated issue and include an example failing image
@hwkim1127 That sounds like a different problem. You may want to open a dedicated issue and include an example failing image
I apologize for previous comment. my code had an error where I was saving png to jpg directly without to_rgb8()
I want to use the DynamicImage.thumbnail method but I got the error
Error: The encoder or decoder for Jpeg does not support the color type Rgba8".
Here is an example of the code below:
My Cargo.toml