Skip to content

Commit

Permalink
cleanup commented out code
Browse files Browse the repository at this point in the history
  • Loading branch information
maxcurzi committed Nov 9, 2024
1 parent 7dab9df commit e90a934
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/pipeline/image_pipeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,8 @@ impl ImagePipeline {
/// * An error occurs while creating an `ImageBuffer` from the resized image data.
pub fn resize(&self, img: &DynamicImage) -> Result<DynamicImage, MyError> {
let width =
// NonZeroU32::new(img.width()).ok_or(MyError::Pipeline(ERROR_DATA.to_string()))?;
img.width();
let height =
// NonZeroU32::new(img.height()).ok_or(MyError::Pipeline(ERROR_DATA.to_string()))?;
img.height();
let src_image = fr::images::Image::from_vec_u8(
width,
Expand All @@ -85,15 +83,11 @@ impl ImagePipeline {
)
.map_err(|err| MyError::Pipeline(format!("{ERROR_RESIZE}:{err:?}")))?;
let mut dst_image = fr::images::Image::new(
// NonZeroU32::new(self.target_resolution.0).ok_or(MyError::Pipeline(ERROR_DATA.to_string()))?,
self.target_resolution.0,
// NonZeroU32::new(self.target_resolution.1).ok_or(MyError::Pipeline(ERROR_DATA.to_string()))?,
self.target_resolution.1,
fr::PixelType::U8x3,
);
// let mut dst_view = dst_image.view_mut(); OLD

// let mut resizer = fr::Resizer::new(fr::ResizeAlg::Nearest);
let mut resizer = fr::Resizer::new();
resizer
.resize(&src_image, &mut dst_image, &fr::ResizeOptions::new().resize_alg(fr::ResizeAlg::Nearest))
Expand Down

0 comments on commit e90a934

Please sign in to comment.