fix PsdImportBudget initializer after merging main

This commit is contained in:
Dylan M. Taylor committed 2026-11-10 23:57:01 +00:00
1 parent f204f33308
commit 8aa9506129
1 file changed
+1 -1
+1 -1
View File
@@ -51,7 +51,7 @@ pub(crate) fn import(file: &PsdFile, all: &[u8], doc: &mut Document, names: &[St
// Each channel keeps whole tiles: a narrow file stores up to 256 times its planes.
let tiles = photocraft_raster::tile_storage_bytes(Rect::from_xywh(0, 0, h.width, h.height), &fmt).saturating_mul(u64::from(h.channels));
if tiles > crate::psd_budget::DEFAULT_PSD_IMPORT_PIXEL_BYTES {
return Err(crate::IoError::PsdImportBudget { required: tiles, limit: crate::psd_budget::DEFAULT_PSD_IMPORT_PIXEL_BYTES });
return Err(crate::IoError::PsdImportBudget { required: tiles, limit: crate::psd_budget::DEFAULT_PSD_IMPORT_PIXEL_BYTES, free_memory: None });
}
for k in 0..usize::from(h.channels) {
let start = k.checked_mul(plane).ok_or_else(invalid)?;