From d81b24a49a9c3fb07fdc04fe868e473d56fac808 Mon Sep 17 00:00:00 2001 From: Chareonwit Kunna <21arenabreakout12@gmail.com> Date: Sat, 21 Nov 2026 12:00:28 +0700 Subject: [PATCH 01/15] docs: fix typos in documentation Signed-off-by: Chareonwit Kunna <21arenabreakout12@gmail.com> --- src/codecs/bmp/decoder.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/codecs/bmp/decoder.rs b/src/codecs/bmp/decoder.rs index cba61aed68..0999c8d819 100644 --- a/src/codecs/bmp/decoder.rs +++ b/src/codecs/bmp/decoder.rs @@ -752,7 +752,7 @@ fn check_for_overflow(width: i32, length: i32, channels: usize) -> ImageResult<( }) } -/// Calculate how many many bytes a buffer holding a decoded image with these properties would +/// Calculate how many bytes a buffer holding a decoded image with these properties would /// require. Returns `None` if the buffer size would overflow or if one of the sizes are negative. fn num_bytes(width: i32, length: i32, channels: usize) -> Option { if width <= 0 || length <= 0 { From c2d1b29c29a4dd7d79d6ed9b1d61c52bf0cdcba4 Mon Sep 17 00:00:00 2001 From: Chareonwit Kunna <21arenabreakout12@gmail.com> Date: Sat, 21 Nov 2026 12:00:32 +0700 Subject: [PATCH 02/15] docs: fix typos in documentation Signed-off-by: Chareonwit Kunna <21arenabreakout12@gmail.com> --- src/codecs/hdr/decoder.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/codecs/hdr/decoder.rs b/src/codecs/hdr/decoder.rs index 20835bb2fe..59ca988e17 100644 --- a/src/codecs/hdr/decoder.rs +++ b/src/codecs/hdr/decoder.rs @@ -449,7 +449,7 @@ fn decode_old_rle(r: &mut R, fb: Rgbe8Pixel, buf: &mut [Rgbe8Pixel]) -> let mut prev_pixel = fb; while x_off < width { let pix = read_rgbe(r)?; - // it's harder to forget to increase x_off if I write this this way. + // it's harder to forget to increase x_off if I write this way. x_off += { if let Some(rl) = rl_marker(pix) { if rl_shift >= 32 { From 2ca1e4fe4f99b83edbc9d0f7e95036b483fbca91 Mon Sep 17 00:00:00 2001 From: Chareonwit Kunna <21arenabreakout12@gmail.com> Date: Sat, 21 Nov 2026 12:00:36 +0700 Subject: [PATCH 03/15] docs: fix typos in documentation Signed-off-by: Chareonwit Kunna <21arenabreakout12@gmail.com> --- src/images/buffer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/images/buffer.rs b/src/images/buffer.rs index b7f0f0f7e1..de7661b11b 100644 --- a/src/images/buffer.rs +++ b/src/images/buffer.rs @@ -664,7 +664,7 @@ where SampleLayout::row_major_packed(

::CHANNEL_COUNT, self.width, self.height) } - /// Return the raw sample buffer with its stride an dimension information. + /// Return the raw sample buffer with its stride and dimension information. /// /// The returned buffer is guaranteed to be well formed in all cases. It is laid out by /// colors, width then height, meaning `channel_stride <= width_stride <= height_stride`. All From bc4ad7e0b019606f32d01763a67cf991b17365a6 Mon Sep 17 00:00:00 2001 From: Chareonwit Kunna <21arenabreakout12@gmail.com> Date: Sat, 21 Nov 2026 12:00:39 +0700 Subject: [PATCH 04/15] docs: fix typos in documentation Signed-off-by: Chareonwit Kunna <21arenabreakout12@gmail.com> --- src/codecs/pnm/encoder.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/codecs/pnm/encoder.rs b/src/codecs/pnm/encoder.rs index 1172ef0c60..c6e3fe5fe3 100644 --- a/src/codecs/pnm/encoder.rs +++ b/src/codecs/pnm/encoder.rs @@ -407,7 +407,7 @@ impl<'a> UncheckedHeader<'a> { impl<'a> CheckedDimensions<'a> { // Check color compatibility with the header. This will only error when we are certain that // the combination is bogus (e.g. combining Pixmap and Palette) but allows uncertain - // combinations (basically a ArbitraryTuplType::Custom with any color of fitting depth). + // combinations (basically an ArbitraryTuplType::Custom with any color of fitting depth). fn check_header_color(self, color: ExtendedColorType) -> ImageResult> { let components = u32::from(color.channel_count()); From 6522af400e7f52cc5a5c2209a83874259b73aa76 Mon Sep 17 00:00:00 2001 From: Chareonwit Kunna <21arenabreakout12@gmail.com> Date: Sat, 21 Nov 2026 12:00:44 +0700 Subject: [PATCH 05/15] docs: fix typos in documentation Signed-off-by: Chareonwit Kunna <21arenabreakout12@gmail.com> --- src/codecs/tga/encoder.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/codecs/tga/encoder.rs b/src/codecs/tga/encoder.rs index 6a65d164cb..7f695a1668 100644 --- a/src/codecs/tga/encoder.rs +++ b/src/codecs/tga/encoder.rs @@ -291,7 +291,7 @@ mod tests { assert_eq!(*err, EncoderError::WidthInvalid(dimension)); } other => panic!( - "Encoding an image that is too wide should return a InvalidWidth \ + "Encoding an image that is too wide should return an InvalidWidth \ it returned {other:?} instead" ), } From fd0cbb52e43fe1bc5d5a6c2dd762c120eb51922c Mon Sep 17 00:00:00 2001 From: Chareonwit Kunna <21arenabreakout12@gmail.com> Date: Sat, 21 Nov 2026 12:00:47 +0700 Subject: [PATCH 06/15] docs: fix typos in documentation Signed-off-by: Chareonwit Kunna <21arenabreakout12@gmail.com> --- src/codecs/tga/encoder.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/codecs/tga/encoder.rs b/src/codecs/tga/encoder.rs index 7f695a1668..e017fd7922 100644 --- a/src/codecs/tga/encoder.rs +++ b/src/codecs/tga/encoder.rs @@ -320,7 +320,7 @@ mod tests { assert_eq!(*err, EncoderError::HeightInvalid(dimension)); } other => panic!( - "Encoding an image that is too tall should return a InvalidHeight \ + "Encoding an image that is too tall should return an InvalidHeight \ it returned {other:?} instead" ), } From 969acb4ee2403c157274891b3e80cb5679f689dd Mon Sep 17 00:00:00 2001 From: Chareonwit Kunna <21arenabreakout12@gmail.com> Date: Sat, 21 Nov 2026 12:00:51 +0700 Subject: [PATCH 07/15] docs: fix typos in documentation Signed-off-by: Chareonwit Kunna <21arenabreakout12@gmail.com> --- src/imageops/colorops.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/imageops/colorops.rs b/src/imageops/colorops.rs index 08b1651bbb..ecb9281376 100644 --- a/src/imageops/colorops.rs +++ b/src/imageops/colorops.rs @@ -385,7 +385,7 @@ pub trait ColorMap { /// cmap.lookup(p.0[0] as usize) /// .expect("indexed color out-of-range") /// }); -/// // Create an black and white image of expected output. +/// // Create a black and white image of expected output. /// let bw = ImageBuffer::from_fn(w, h, |x, y| -> Luma { /// if x <= (w / 2) { /// [0].into() From a01ea64fac45ec7f36364d90c385391f3ebf5550 Mon Sep 17 00:00:00 2001 From: Chareonwit Kunna <21arenabreakout12@gmail.com> Date: Sat, 21 Nov 2026 12:00:54 +0700 Subject: [PATCH 08/15] docs: fix typos in documentation Signed-off-by: Chareonwit Kunna <21arenabreakout12@gmail.com> --- src/metadata/moxcms.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/metadata/moxcms.rs b/src/metadata/moxcms.rs index 9f02b0783b..8b1e545394 100644 --- a/src/metadata/moxcms.rs +++ b/src/metadata/moxcms.rs @@ -396,7 +396,7 @@ impl ColorProfile { } impl Cicp { - /// Get an compute representation of an ICC profile for RGB. + /// Get a compute representation of an ICC profile for RGB. /// /// Note you should *not* be using this profile for export in a file, as discussed below. /// From 132eaceae7a90a625651b657b9f099cc5b89bb59 Mon Sep 17 00:00:00 2001 From: Chareonwit Kunna <21arenabreakout12@gmail.com> Date: Sat, 21 Nov 2026 12:00:58 +0700 Subject: [PATCH 09/15] docs: fix typos in documentation Signed-off-by: Chareonwit Kunna <21arenabreakout12@gmail.com> --- src/metadata/moxcms.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/metadata/moxcms.rs b/src/metadata/moxcms.rs index 8b1e545394..59fb2a6299 100644 --- a/src/metadata/moxcms.rs +++ b/src/metadata/moxcms.rs @@ -378,7 +378,7 @@ impl Moxcms { /// This is the whole input information which we must be able to pass to the CMS in a support /// transform, to handle all possible combinations of `ColorType` pixels that can be thrown at us. /// For instance, in a previous iteration we had a separate gray profile here (but now handle that -/// internally by expansion to RGB through an YCbCr). Future iterations may add additional structs +/// internally by expansion to RGB through a YCbCr). Future iterations may add additional structs /// to be computed for validating `CicpTransform::new`. struct ColorProfile { rgb: moxcms::ColorProfile, From dbf86a7e5ae5fc0a929a117a84dece96412d905c Mon Sep 17 00:00:00 2001 From: Chareonwit Kunna <21arenabreakout12@gmail.com> Date: Sat, 21 Nov 2026 12:01:02 +0700 Subject: [PATCH 10/15] docs: fix typos in documentation Signed-off-by: Chareonwit Kunna <21arenabreakout12@gmail.com> --- src/images/buffer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/images/buffer.rs b/src/images/buffer.rs index de7661b11b..271c3f0cc6 100644 --- a/src/images/buffer.rs +++ b/src/images/buffer.rs @@ -1096,7 +1096,7 @@ impl ImageBuffer { /// Set primaries and transfer characteristics from a Cicp color space. /// - /// Returns an error if `cicp` uses features that are not support with an RGB color space, e.g. + /// Returns an error if `cicp` uses features that are not supported with an RGB color space, e.g. /// a matrix or narrow range (studio encoding) channels. pub fn set_color_space(&mut self, cicp: Cicp) -> ImageResult<()> { self.color = cicp.try_into_rgb()?; From 7b668532351f64e58d909b0973a327cbb4e68f79 Mon Sep 17 00:00:00 2001 From: Chareonwit Kunna <21arenabreakout12@gmail.com> Date: Sat, 21 Nov 2026 12:01:08 +0700 Subject: [PATCH 11/15] docs: fix typos in documentation Signed-off-by: Chareonwit Kunna <21arenabreakout12@gmail.com> --- src/images/dynimage.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/images/dynimage.rs b/src/images/dynimage.rs index 594325dd56..dadc1e3828 100644 --- a/src/images/dynimage.rs +++ b/src/images/dynimage.rs @@ -947,7 +947,7 @@ impl DynamicImage { /// Set primaries and transfer characteristics from a Cicp color space. /// - /// Returns an error if `cicp` uses features that are not support with an RGB color space, e.g. + /// Returns an error if `cicp` uses features that are not supported with an RGB color space, e.g. /// a matrix or narrow range (studio encoding) channels. pub fn set_color_space(&mut self, cicp: Cicp) -> ImageResult<()> { dynamic_map!(self, ref mut p, p.set_color_space(cicp)) From d7e030e619ffcef8d675de018abb51996a5e206f Mon Sep 17 00:00:00 2001 From: Chareonwit Kunna <21arenabreakout12@gmail.com> Date: Sat, 21 Nov 2026 12:01:11 +0700 Subject: [PATCH 12/15] docs: fix typos in documentation Signed-off-by: Chareonwit Kunna <21arenabreakout12@gmail.com> --- src/images/generic_image.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/images/generic_image.rs b/src/images/generic_image.rs index 6e8c5b71ed..8fcaabacfe 100644 --- a/src/images/generic_image.rs +++ b/src/images/generic_image.rs @@ -155,7 +155,7 @@ pub struct Pixels<'a, I: ?Sized + 'a> { image: &'a I, /// Maintains `x < self.width` with a non-empty image. x: u32, - /// Maintains `y <= self.height` and `self.height == 0` with an empty image.. + /// Maintains `y <= self.height` and `self.height == 0` with an empty image. y: u32, width: u32, height: u32, From 623f88df37bef07c8a841c51f11d886918bb028f Mon Sep 17 00:00:00 2001 From: Chareonwit Kunna <21arenabreakout12@gmail.com> Date: Sat, 21 Nov 2026 12:01:15 +0700 Subject: [PATCH 13/15] docs: fix typos in documentation Signed-off-by: Chareonwit Kunna <21arenabreakout12@gmail.com> --- src/codecs/avif/decoder.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/codecs/avif/decoder.rs b/src/codecs/avif/decoder.rs index 15cb5e1344..24a87e25ad 100644 --- a/src/codecs/avif/decoder.rs +++ b/src/codecs/avif/decoder.rs @@ -190,7 +190,7 @@ fn reshape_plane( return Ok(vec![]); } - // Except for an empty image a true stride is required.. + // Except for an empty image a true stride is required. if stride == 0 { return Err(error_map(AvifDecoderError::InvalidStride(stride))); } From 320f58b441704eeee451ba4cc8c03c67fc2a7c85 Mon Sep 17 00:00:00 2001 From: Chareonwit Kunna <21arenabreakout12@gmail.com> Date: Sat, 21 Nov 2026 12:01:20 +0700 Subject: [PATCH 14/15] docs: fix typos in documentation Signed-off-by: Chareonwit Kunna <21arenabreakout12@gmail.com> --- src/images/dynimage.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/images/dynimage.rs b/src/images/dynimage.rs index dadc1e3828..77fe3813a7 100644 --- a/src/images/dynimage.rs +++ b/src/images/dynimage.rs @@ -650,7 +650,7 @@ impl DynamicImage { } } - /// Return a reference to an 16bit RGB image + /// Return a reference to a 16bit RGB image #[must_use] pub fn as_rgb16(&self) -> Option<&Rgb16Image> { match *self { @@ -659,7 +659,7 @@ impl DynamicImage { } } - /// Return a mutable reference to an 16bit RGB image + /// Return a mutable reference to a 16bit RGB image pub fn as_mut_rgb16(&mut self) -> Option<&mut Rgb16Image> { match *self { DynamicImage::ImageRgb16(ref mut p) => Some(p), @@ -667,7 +667,7 @@ impl DynamicImage { } } - /// Return a reference to an 16bit RGBA image + /// Return a reference to a 16bit RGBA image #[must_use] pub fn as_rgba16(&self) -> Option<&Rgba16Image> { match *self { @@ -676,7 +676,7 @@ impl DynamicImage { } } - /// Return a mutable reference to an 16bit RGBA image + /// Return a mutable reference to a 16bit RGBA image pub fn as_mut_rgba16(&mut self) -> Option<&mut Rgba16Image> { match *self { DynamicImage::ImageRgba16(ref mut p) => Some(p), @@ -718,7 +718,7 @@ impl DynamicImage { } } - /// Return a reference to an 16bit Grayscale image + /// Return a reference to a 16bit Grayscale image #[must_use] pub fn as_luma16(&self) -> Option<&Gray16Image> { match *self { @@ -736,7 +736,7 @@ impl DynamicImage { } } - /// Return a mutable reference to an 16bit Grayscale image + /// Return a mutable reference to a 16bit Grayscale image pub fn as_mut_luma16(&mut self) -> Option<&mut Gray16Image> { match *self { DynamicImage::ImageLuma16(ref mut p) => Some(p), @@ -753,7 +753,7 @@ impl DynamicImage { } } - /// Return a reference to an 16bit Grayscale image with an alpha channel + /// Return a reference to a 16bit Grayscale image with an alpha channel #[must_use] pub fn as_luma_alpha16(&self) -> Option<&GrayAlpha16Image> { match *self { @@ -770,7 +770,7 @@ impl DynamicImage { } } - /// Return a mutable reference to an 16bit Grayscale image with an alpha channel + /// Return a mutable reference to a 16bit Grayscale image with an alpha channel pub fn as_mut_luma_alpha16(&mut self) -> Option<&mut GrayAlpha16Image> { match *self { DynamicImage::ImageLumaA16(ref mut p) => Some(p), From 91d7ec2497cab027ca4465b42488c2e2843f4873 Mon Sep 17 00:00:00 2001 From: Chareonwit Kunna <21arenabreakout12@gmail.com> Date: Sat, 21 Nov 2026 12:01:25 +0700 Subject: [PATCH 15/15] docs: fix typos in documentation Signed-off-by: Chareonwit Kunna <21arenabreakout12@gmail.com> --- src/images/dynimage.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/images/dynimage.rs b/src/images/dynimage.rs index 77fe3813a7..df4a3c93a1 100644 --- a/src/images/dynimage.rs +++ b/src/images/dynimage.rs @@ -684,7 +684,7 @@ impl DynamicImage { } } - /// Return a reference to an 32bit RGB image + /// Return a reference to a 32bit RGB image #[must_use] pub fn as_rgb32f(&self) -> Option<&Rgb32FImage> { match *self { @@ -693,7 +693,7 @@ impl DynamicImage { } } - /// Return a mutable reference to an 32bit RGB image + /// Return a mutable reference to a 32bit RGB image pub fn as_mut_rgb32f(&mut self) -> Option<&mut Rgb32FImage> { match *self { DynamicImage::ImageRgb32F(ref mut p) => Some(p), @@ -701,7 +701,7 @@ impl DynamicImage { } } - /// Return a reference to an 32bit RGBA image + /// Return a reference to a 32bit RGBA image #[must_use] pub fn as_rgba32f(&self) -> Option<&Rgba32FImage> { match *self { @@ -710,7 +710,7 @@ impl DynamicImage { } } - /// Return a mutable reference to an 32bit RGBA image + /// Return a mutable reference to a 32bit RGBA image pub fn as_mut_rgba32f(&mut self) -> Option<&mut Rgba32FImage> { match *self { DynamicImage::ImageRgba32F(ref mut p) => Some(p), @@ -727,7 +727,7 @@ impl DynamicImage { } } - /// Return a reference to an 32bit Grayscale image + /// Return a reference to a 32bit Grayscale image #[must_use] pub fn as_luma32f(&self) -> Option<&Gray32FImage> { match *self { @@ -744,7 +744,7 @@ impl DynamicImage { } } - /// Return a mutable reference to an 32bit Grayscale image + /// Return a mutable reference to a 32bit Grayscale image #[must_use] pub fn as_mut_luma32f(&mut self) -> Option<&mut Gray32FImage> { match *self { @@ -762,7 +762,7 @@ impl DynamicImage { } } - /// Return a reference to an 32bit Grayscale image with an alpha channel + /// Return a reference to a 32bit Grayscale image with an alpha channel pub fn as_luma_alpha32f(&self) -> Option<&GrayAlpha32FImage> { match *self { DynamicImage::ImageLumaA32F(ref p) => Some(p), @@ -778,7 +778,7 @@ impl DynamicImage { } } - /// Return a mutable reference to an 32bit Grayscale image with an alpha channel + /// Return a mutable reference to a 32bit Grayscale image with an alpha channel pub fn as_mut_luma_alpha32f(&mut self) -> Option<&mut GrayAlpha32FImage> { match *self { DynamicImage::ImageLumaA32F(ref mut p) => Some(p),