From fdfb18885507e60604d3188078e3a34df82128ec Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Fri, 13 Nov 2026 01:24:36 -0500 Subject: [PATCH] Use array chunks for raster pixels --- crates/image-codecs/src/inspection.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/image-codecs/src/inspection.rs b/crates/image-codecs/src/inspection.rs index e263eea3a..b5dc0c95b 100644 --- a/crates/image-codecs/src/inspection.rs +++ b/crates/image-codecs/src/inspection.rs @@ -181,7 +181,7 @@ pub fn classify_tone(bytes: &[u8]) -> Option { let rgba = decoded.convert(ChannelLayout::Rgba, SampleType::U8); let mut opaque = true; let mut two_level = true; - for p in rgba.data().chunks_exact(4) { + for p in rgba.data().as_chunks::<4>().0 { match p[3] { 0 => opaque = false, 255 if p[0] == p[1] && p[1] == p[2] => two_level &= p[0] == 0 || p[0] == 255,