File: pdfspace.mli

package info (click to toggle)
camlpdf 0.5-1
  • links: PTS, VCS
  • area: non-free
  • in suites: squeeze, wheezy
  • size: 1,516 kB
  • ctags: 2,689
  • sloc: ml: 18,229; ansic: 139; makefile: 139
file content (36 lines) | stat: -rw-r--r-- 1,250 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
(** Colour Spaces - Some types of colourspace missing.*)

(** A Tristimulus Point *)
type point = float * float * float

(** ICC Based Colour Spaces *)
type iccbased =
 {icc_n : int;
  icc_alternate : colourspace;
  icc_range : float array;
  icc_metadata : Pdf.pdfobject option;
  icc_stream : Pdf.pdfobject}

(** Colour spaces *)
and colourspace =
  | DeviceGray
  | DeviceRGB
  | DeviceCMYK
  | CalGray of point * point * float (* White, Black, Gamma *)
  | CalRGB of point * point * float array * float array (* White, Black, Gamma, Matrix *)
  | Lab of point * point * float array (* White, Black, Range *)
  | ICCBased of iccbased
  | Indexed of colourspace * (int, int list) Hashtbl.t (* Base colourspace, lookup table *)
  | Pattern
  | Separation of string * colourspace * Pdffun.pdf_fun
  | DeviceN of string array * colourspace * Pdffun.pdf_fun * Pdf.pdfobject

(** Produce a debug string *)
val string_of_colourspace : colourspace -> string

(** Read the name of a colour, if it has one *)
val name_of_colourspace : colourspace -> string option

(** Read a colourspace from a PDF given a document, page resources dictionary and the colourspace object *)
val read_colourspace : Pdf.pdfdoc -> Pdf.pdfobject -> Pdf.pdfobject -> colourspace