From c63120d4ceedd141c14fd69a203793af5e76f1e6 Mon Sep 17 00:00:00 2001 From: Surma Date: Sun, 13 Dec 2020 16:36:00 +0000 Subject: [PATCH] Minor cleanup --- codecs/resize/src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/codecs/resize/src/lib.rs b/codecs/resize/src/lib.rs index 65f40a46..5473706b 100644 --- a/codecs/resize/src/lib.rs +++ b/codecs/resize/src/lib.rs @@ -10,7 +10,7 @@ use resize::Type; use wasm_bindgen::prelude::*; mod srgb; -use srgb::{linear_to_srgb, srgb_to_linear, Clamp}; +use srgb::{linear_to_srgb, Clamp}; cfg_if! { // When the `wee_alloc` feature is enabled, use `wee_alloc` as the global @@ -85,7 +85,7 @@ pub fn resize( let mut output_image: Vec = vec_with_len(num_output_pixels * 4, 0); - // If both options are false, there is no preprocessing on the pixel valus + // If both options are false, there is no preprocessing on the pixel values // and we can skip the loop. if !premultiply && !color_space_conversion { let mut resizer = resize::new( @@ -100,8 +100,8 @@ pub fn resize( return output_image; } - // Otherwise, we convert to f32 images so we don’t introduce - // banding through the conversions. + // Otherwise, we convert to f32 images to keep the + // conversions as lossless and high-fidelity as possible. let (to_linear, to_srgb) = srgb_converter_funcs(color_space_conversion); let (premultiplier, demultiplier) = alpha_multiplier_funcs(premultiply);