image: flip image vertically

This commit is contained in:
chyyran 2022-11-21 02:13:22 -05:00
parent 10eb2c3106
commit 4cbc831bf3

View file

@ -8,7 +8,8 @@ pub struct Image {
impl Image {
pub fn load(path: impl AsRef<Path>) -> Result<Self, image::ImageError>{
let image = image::open(path.as_ref())?.to_rgba8();
let image = image::open(path.as_ref())?.flipv().to_rgba8();
let height = image.height();
let width = image.width();