mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
fix: image rotation with orientation 4
https://github.com/image-rs/image/issues/1958#issuecomment-1925350954
This commit is contained in:
parent
5086c02380
commit
82359ef290
2 changed files with 3 additions and 3 deletions
|
|
@ -130,7 +130,7 @@ impl Image {
|
|||
img = match orientation {
|
||||
2 => DynamicImage::ImageRgba8(imageops::flip_horizontal(&img)),
|
||||
3 => DynamicImage::ImageRgba8(imageops::rotate180(&img)),
|
||||
4 => DynamicImage::ImageRgba8(imageops::flip_horizontal(&img)),
|
||||
4 => DynamicImage::ImageRgba8(imageops::flip_vertical(&img)),
|
||||
5 => DynamicImage::ImageRgba8(imageops::flip_horizontal(&imageops::rotate90(&img))),
|
||||
6 => DynamicImage::ImageRgba8(imageops::rotate90(&img)),
|
||||
7 => DynamicImage::ImageRgba8(imageops::flip_horizontal(&imageops::rotate270(&img))),
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ use super::Utils;
|
|||
|
||||
impl Utils {
|
||||
pub(super) fn log(lua: &Lua, ya: &Table) -> mlua::Result<()> {
|
||||
ya.set("dbg", lua.create_async_function(|_, s: String| async move { Ok(debug!("{s}")) })?)?;
|
||||
ya.set("dbg", lua.create_function(|_, s: String| Ok(debug!("{s}")))?)?;
|
||||
|
||||
ya.set("err", lua.create_async_function(|_, s: String| async move { Ok(error!("{s}")) })?)?;
|
||||
ya.set("err", lua.create_function(|_, s: String| Ok(error!("{s}")))?)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue