image: flip image vertically
This commit is contained in:
parent
10eb2c3106
commit
4cbc831bf3
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in a new issue