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