mirror of
https://github.com/storytold/photocraft.git
synced 2026-10-14 11:16:53 -04:00
io/affinity: as_chunks for the mask's grey extraction (clippy 1.99)
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01UHgFEHEsefoQoBParH47JA
This commit is contained in:
1 file changed
+1
-1
@@ -524,7 +524,7 @@ impl Builder {
|
||||
|
||||
fn mask(&mut self, img: &af::Image, to_doc: Affine) -> Option<Surface> {
|
||||
let (w, h, rgba) = self.pixels(img)?;
|
||||
let grey: Vec<u8> = rgba.chunks_exact(4).map(|p| p[0]).collect();
|
||||
let grey: Vec<u8> = rgba.as_chunks::<4>().0.iter().map(|p| p[0]).collect();
|
||||
let m = to_doc.mul(&affine(img.transform));
|
||||
self.resample(w, h, &grey, m, 1)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user