From ba81e5fc6e7e5f176ba0dc6aa20d8b8fd6366c29 Mon Sep 17 00:00:00 2001 From: John Whitington Date: Tue, 20 Feb 2024 16:02:56 +0000 Subject: [PATCH] RGB specials --- cpdfimage.ml | 21 ++++++++++++++------- cpdfmanual.pdf | Bin 412130 -> 412264 bytes cpdfmanual.tex | 2 ++ 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/cpdfimage.ml b/cpdfimage.ml index 1b4762d..99420ee 100644 --- a/cpdfimage.ml +++ b/cpdfimage.ml @@ -637,10 +637,10 @@ let test_bpc pdf dict = | _ -> 0 let lossless_resample pdf ~pixel_threshold ~length_threshold ~factor ~interpolate ~path_to_convert s dict reference = - (* Printf.printf "***lossless_resample IN dictionary: %S\n" (Pdfwrite.string_of_pdf dict); *) + (*Printf.printf "***lossless_resample IN dictionary: %S\n" (Pdfwrite.string_of_pdf dict); *) let in_components = test_components pdf dict in let in_bpc = test_bpc pdf dict in - Printf.printf "\n***IN components = %i, bpc = %i\n" in_components in_bpc; + (*Printf.printf "\n***IN components = %i, bpc = %i\n" in_components in_bpc;*) match lossless_out pdf ~pixel_threshold ~length_threshold ".png" s dict reference with | None -> () | Some (_, _, _, 4, _, _) -> Printf.printf "lossless resampling for CMYK not supported yet\n%!" @@ -668,8 +668,17 @@ let lossless_resample pdf ~pixel_threshold ~length_threshold ~factor ~interpolat | Pdf.Stream {contents = Pdf.Dictionary d, data} as s -> let out_components = test_components pdf s in let out_bpc = test_bpc pdf s in - Printf.printf "***OUT components = %i, bpc = %i\n" out_components out_bpc; - if out_components <> in_components || in_bpc <> out_bpc then + (*Printf.printf "***OUT components = %i, bpc = %i\n" out_components out_bpc;*) + let rgb_to_grey_special = + let was_rgb = + match Pdf.lookup_direct pdf "/ColorSpace" dict with + | Some (Pdf.Name ("/DeviceRGB" | "/CalRGB")) -> true + | _ -> false + in + in_bpc = out_bpc && in_components = 3 && out_components = 1 && was_rgb + in + (*Printf.printf "***rgb_to_grey_special = %b\n" rgb_to_grey_special;*) + if (out_components <> in_components || in_bpc <> out_bpc) && not rgb_to_grey_special then begin if !debug_image_processing then Printf.printf "wrong bpc / components returned. Skipping.\n%!"; !reference @@ -677,9 +686,7 @@ let lossless_resample pdf ~pixel_threshold ~length_threshold ~factor ~interpolat else begin if !debug_image_processing then Printf.printf "lossless resample %i -> %i (%i%%)\n%!" size newsize (int_of_float (float newsize /. float size *. 100.)); - (* We will then test all the files we have available, and make sure all results correct *) - (* Then we will see about how to poke convert to do the correct thing - e.g not use PNG, force different output etc. *) - let d' = fold_right (fun (k, v) d -> if k <> "/ColorSpace" then add k v d else d) d (match dict with Pdf.Dictionary x -> x | _ -> []) in + let d' = fold_right (fun (k, v) d -> if k <> "/ColorSpace" || rgb_to_grey_special then add k v d else d) d (match dict with Pdf.Dictionary x -> x | _ -> []) in (*Printf.printf "***lossless_resample OUT dictionary: %S\n" (Pdfwrite.string_of_pdf (Pdf.Dictionary d')); *) (Pdf.Dictionary d', data) end diff --git a/cpdfmanual.pdf b/cpdfmanual.pdf index 557dcc0b3cdd1589ec7503e560d092c30c63a286..39cd9f9e36101fc66a1b89e1d91f1d48917326c8 100644 GIT binary patch delta 5532 zcmah}cQ_l~*GC#7)QlLlNm0@oQM>luQoB*3B{r?9ii#4{tkF`lA@(RLM$y`<6^&68 zwdzZ)+FD|~zWqJF=Y8J4-aqbnKKFj^Irp4<@8>M0as7PB6^^AOP$}^O6r>a~qy?zN zF}YSoe$xufAIUa9#Q+jnh5CjYKD^#>`@p~nb&EiB@_i*YiP&-xd1BjEvX-bt>uQ5) z3eV7w>=&|K2X3{^FX6-55^qz9w^(xY^Gb74E#vRi8Qm&0gsJ&DR$k|tU;@8)!7kJ3 z}GI-`$`hzR-62F!Q4*_p}J@Ro{(=9|Jwd6YQqjQLkr2VEBu zpq5^#^c16-IATYFTc$M3a>8u1Q146)P&m>#Iqv zKOQE~Omv4HicSwVG?Y;*>(KbVSbv*!ZARz8F8aaXKB91`RpjM6MU)7XK3SFmqH)Tk zm8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