Skip to content

Commit

Permalink
Merge pull request SalOne22#154 from SalOne22/bugfix/resize
Browse files Browse the repository at this point in the history
Fixed resize issue
  • Loading branch information
SalOne22 authored Dec 20, 2023
2 parents b0da163 + d085531 commit 3766c35
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/decoder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ impl<R: BufRead + Seek> Decoder<R> {
#[cfg(feature = "transform")]
let orientation = self.fix_orientation;

#[allow(unused_mut)]
let mut image = match self.format {
#[cfg(feature = "jxl")]
Some(ImageFormat::JpegXl) => self.decode_jpegxl(),
Expand Down
2 changes: 1 addition & 1 deletion src/encoder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ impl<W: Write + Seek + std::panic::UnwindSafe> Encoder<W> {
ResizeType::Lanczos3 => image::imageops::Lanczos3,
};

self.data.resize(width as u32, height as u32, filter);
self.data = self.data.resize(width as u32, height as u32, filter);
}

// TODO: Move quantization out from encoder to operations
Expand Down

0 comments on commit 3766c35

Please sign in to comment.