2022-01-13 17:35:03 +01:00
|
|
|
(** Images *)
|
|
|
|
|
2023-12-28 17:18:25 +01:00
|
|
|
(** Print info when processing image *)
|
|
|
|
val debug_image_processing : bool ref
|
|
|
|
|
2022-01-13 17:35:03 +01:00
|
|
|
(** Extract images. *)
|
2023-12-28 16:48:30 +01:00
|
|
|
val extract_images :
|
|
|
|
?raw:bool -> ?path_to_p2p:string -> ?path_to_im:string ->
|
|
|
|
Cpdfmetadata.encoding -> bool -> bool -> Pdf.t -> int list -> string -> unit
|
2022-01-13 17:35:03 +01:00
|
|
|
|
|
|
|
(** Report image resolutions. *)
|
2024-01-04 18:40:15 +01:00
|
|
|
val image_resolution : Pdf.t -> int list -> float -> (int * string * int * int * float * float * int) list
|
2023-08-14 17:15:11 +02:00
|
|
|
|
2023-11-13 18:55:59 +01:00
|
|
|
(** List images in JSON format *)
|
|
|
|
val images : Pdf.t -> int list -> Cpdfyojson.Safe.t
|
|
|
|
|
2024-01-04 12:43:27 +01:00
|
|
|
(** Reprocess images *)
|
2023-12-27 20:53:02 +01:00
|
|
|
val process :
|
2024-02-01 17:38:07 +01:00
|
|
|
q:float -> qlossless:float -> onebppmethod:string -> jbig2_lossy_threshold:float ->
|
|
|
|
length_threshold:int -> percentage_threshold:float -> pixel_threshold:int ->
|
|
|
|
dpi_threshold:float -> factor:float -> interpolate:bool ->
|
2024-01-04 12:33:17 +01:00
|
|
|
path_to_jbig2enc:string -> path_to_convert:string -> int list -> Pdf.t -> unit
|
2023-12-06 13:20:27 +01:00
|
|
|
|
2023-08-14 17:15:11 +02:00
|
|
|
(**/**)
|
2023-12-04 18:15:15 +01:00
|
|
|
val image_of_input : (unit -> Pdfio.bytes -> Pdf.pdfobject * (int * Pdf.pdfobject) list) -> Pdfio.input -> Pdf.t
|
2023-12-04 17:32:12 +01:00
|
|
|
val obj_of_jpeg_data : Pdfio.bytes -> Pdf.pdfobject * (int * Pdf.pdfobject) list
|
|
|
|
val obj_of_png_data : Pdfio.bytes -> Pdf.pdfobject * (int * Pdf.pdfobject) list
|
|
|
|
val obj_of_jbig2_data : ?global:Pdfio.bytes -> Pdfio.bytes -> Pdf.pdfobject * (int * Pdf.pdfobject) list
|