'Rust open image with other format than file extension
I am trying to open an image in my Rust program. The image is named foo.png, but it won't open the image with image::open("foo.png").
If I rename the file to foo.jpeg, I can open the image, so my guess is that the formatting and the file extension do not match.
My question is then. how do I open a file named foo.png, but decode it as a jpeg?
I have tried image::io::Reader, but I can't seem to make it work properly.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
