From 4b4b6f92bf3ed154c03cc3d26466c177461f1ee8 Mon Sep 17 00:00:00 2001 From: John Whitington Date: Wed, 10 Jan 2024 17:48:53 +0000 Subject: [PATCH] Beginning JBIG2Lossy work --- cpdfimage.ml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cpdfimage.ml b/cpdfimage.ml index 2c43723..598e441 100644 --- a/cpdfimage.ml +++ b/cpdfimage.ml @@ -711,6 +711,10 @@ let recompress_1bpp_jbig2_lossless ~pixel_threshold ~length_threshold ~path_to_j end let preprocess_jbig2_lossy ~path_to_jbig2enc inrange highdpi pdf = () + (* Write out each stream as a *.pnm, if we choose to process it, restoring if not. *) + (* Call jbig2 to generate one *.jbig2 for each, and a *.jbig2globals *) + (* Build the JBIG2Globals stream for the file *) + (* For each file, read in the new JBIG2 data, and build each new image stream to replace the old one *) let process ?q ?qlossless ?onebppmethod ~length_threshold ~percentage_threshold ~pixel_threshold ~dpi_threshold