mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-15 15:22:54 +00:00
Convert colours: pass the image budget to pixels after the merge with upstream
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
43c40582e7
commit
a94808ffe6
1 file changed
+2
-1
@@ -1368,7 +1368,8 @@ pub fn recolour_image(doc: &Document, s: &Stream, target: ImageTarget) -> Option
|
||||
return None;
|
||||
}
|
||||
let (w, h) = (d.int(b"Width")? as u32, d.int(b"Height")? as u32);
|
||||
let px = pixels(doc, s, n)?;
|
||||
// One picture a call: `pixels` itself refuses one past MAX_PIXELS, so no shared allowance is kept here.
|
||||
let px = pixels(doc, s, n, &mut ImageBudget::with_work(u64::MAX))?;
|
||||
let was_dct = is_dct(s)?;
|
||||
let out: Vec<u8> = match (n, target) {
|
||||
(3, ImageTarget::Gray) => {
|
||||
|
||||
Reference in new issue
Block a user