Prevent indexed colourspace images being JPEGd

This commit is contained in:
John Whitington 2024-02-21 17:03:22 +00:00
parent 9f4de0e069
commit b3ed5a7e8b
1 changed files with 5 additions and 1 deletions

View File

@ -606,7 +606,11 @@ let lossless_out pdf ~pixel_threshold ~length_threshold extension s dict referen
let lossless_to_jpeg pdf ~pixel_threshold ~length_threshold ~percentage_threshold ~qlossless ~path_to_convert s dict reference =
complain_convert path_to_convert;
match lossless_out pdf ~pixel_threshold ~length_threshold ".jpg" s dict reference with None -> () | Some (out, out2, size, components, w, h) ->
match lossless_out pdf ~pixel_threshold ~length_threshold ".jpg" s dict reference with
| None -> ()
| Some (_, _, _, -2, _, _) ->
if !debug_image_processing then Printf.printf "skipping indexed colorspace\n%!"
| Some (out, out2, size, components, w, h) ->
let retcode =
let command =
(Filename.quote_command path_to_convert