PhotoCraft: An open-source, photo editor written by scratch in pure Rust
fix(psd): mark layers with no recognized channels as damaged
David Bonnierdc1ced70639e
diff --git a/crates/io/src/psd_import.rs b/crates/io/src/psd_import.rsindex 0d1e7a6c5..db8d4056a 100644--- a/crates/io/src/psd_import.rs+++ b/crates/io/src/psd_import.rs@@ -226,7 +226,7 @@ impl Ctx<'_> {// Only decoded channel data justifies a buffer: the decoders bound their output by the// bytes in the file, but a bare rectangle can declare 300000² pixels in a few bytes (#755).if planes.iter().all(Option::is_none) {- self.warn(format!("layer \"{name}\": no channel data for its {w}x{h} bounds; treated as empty"));+ self.warn_unreadable_data(format!("layer \"{name}\": no channel data for its {w}x{h} bounds; treated as empty"));return Surface::new(self.fmt);}let refs: Vec<Option<&[u8]>> = planes.iter().map(|p| p.as_deref()).collect();