mirror of
https://github.com/storytold/photocraft.git
synced 2026-11-11 00:11:46 +00:00
fix PsdImportBudget initializer after merging main
This commit is contained in:
1 parent
f204f33308
commit
8aa9506129
1 file changed
+1
-1
@@ -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)?;
|
||||
|
||||
Reference in new issue
Block a user