1img-ps(n) Img img-ps(n)
2
3
4
6 img-ps - Img, Adobe PostScript Format (ps)
7
9 package require Tk
10
11 package require img::ps ?1.4?
12
13 image create photo ?name? ?options?
14
15
17 The package img::ps is a sub-package of Img. It can be loaded as a part
18 of the complete Img support, via package require Img, or on its own,
19 via package require img::ps.
20
21 Like all packages of Img it does not provide new commands, but extends
22 the existing Tk command image so that it supports files containing
23 raster images in the Adobe PostScript Format (ps). More specifically
24 img::ps extends Tk's photo image type.
25
26 The name of the new format handler is ps. This handler provides new
27 additional configuration options. See section PostScript OPTIONS for
28 more detailed explanations.
29
30 Note that this package provides a pdf handler too, i.e. a handler for
31 the Adobe Portable Document Format. That handler accepts the same
32 options as the ps handler.
33
34 The package delegates the actual conversion of data in PostScript and
35 PDF format into a raster image to the ghostscript application. It
36 therefore depends upon the presence of said application and is non-
37 functional is ghostscript is not present.
38
39 All of the above means that in a call like
40
41 image create photo ?name? ?options?
42
43 [1] Image data in ps and PDF format (options -data and -file) is
44 detected automatically.
45
46 [2] The format names ps and pdf are recognized by the option -for‐
47 mat. In addition the value for the option is treated as list
48 and may contain any of the special options listed in section
49 PostScript OPTIONS.
50
52 The handler provides two options, both influencing the reading of Post‐
53 Script or PDF images. The handler is not able to write images in Post‐
54 Script or PDF.
55
56 -index n
57 This option is for reading from PostScript/PDF data containing
58 more than one page. When specified it will read the n'th page in
59 the data. The first page is at index 0 and will be read by
60 default, i.e. when the option is not specified.
61
62 Note: This option is not yet implemented.
63
64 -zoom X Y
65 Multiply image size by the given scale factors. If Y is missing,
66 the default is the same as X. X and Y are allowed to be in
67 floating point format, but they are rounded to the nearest prac‐
68 tically possible value. For postscript this means the zoom fac‐
69 tors should be multiples of 1/72.
70
72 The code provided by Img does not perform the interpretation and ras‐
73 terizing of the input by itself but delegates this to the gs applica‐
74 tion. This is the GhostScript implementation of PostScript (and PDF).
75
76 If gs is not installed this format handler cannot be used.
77
79 img-bmp, img-gif, img-ico, img-intro, img-jpeg, img-pcx, img-pixmap,
80 img-png, img-ppm, img-ps, img-sgi, img-sun, img-tga, img-tiff, img-win‐
81 dow, img-xbm, img-xpm
82
84 ghostscript, gs, image handling, pdf, postscript, ps, tk
85
87 Copyright (c) 1995-2009 Jan Nijtmans <nijtmans@users.sourceforge.net>
88
89
90
91
92img-ps 1.4 img-ps(n)