img-ps - PostScript and PDF format (ps)
package require img::ps
Like all packages of Img it does not provide new commands, but extends the existing Tk command image, so that it supports files containing raster images in the PostScript and PDF format (ps). More specifically img::ps extends Tk's photo image type.
The name of the new format handler is ps. This handler provides new additional configuration options. See section Options for more detailed explanations.
Note that this package provides a pdf handler too, i.e. a handler for the Adobe Portable Document Format. That handler accepts the same options as the ps handler.
The package delegates the actual conversion of data in PostScript and PDF format into a raster image to the GhostScript application. It therefore depends upon the presence of program gs on Unix and gswin64c.exe in environment variable PATH and is non-functional, if GhostScript is not installed.
All of the above means that in a call like
Image data in PostScript and PDF format (options -data and -file) is detected automatically.
The format names ps and pdf are recognized by the option -format.
In addition the value for the option is treated as list and may contain any of the special options listed in section Options.
The package img::ps is not loaded when doing a package require Img, but must be loaded explicitly via package require img::ps.
This format handler only supports read functionality.
Chapter Multi-page Images of of the Img manual page describes the handling of images with multiple pages.
This format handler only supports a limited number of file types:
PostScript files must have keyword %%BoundingBox in the file header. The syntax %%BoundingBox (atend) is not supported.
PDF files are assumed to be of size DIN A4. It is recommend to use a specialized PDF extension like tclMuPDF.
The handler provides the following options:
Available since version 2.0.
If set to true, additional information about the read image is printed to stdout. Default is false.
Available since version 1.2.4.
Read the page at specified index. The first page is at index 0. Default is 0.
Available since version 1.2.4.
Scale image by specified double values. If y is not specified, it is set to the value of x. Default is 1.0.
Available since version 2.0.
Specify the GhostScript executable program as absolute path.
img, img-bmp, img-dted, img-flir, img-gif, img-ico, img-jpeg, img-pcx, img-pixmap, img-png, img-ppm, img-ps, img-raw, img-sgi, img-sun, img-tga, img-tiff, img-window, img-xbm, img-xpm
Copyright © 1995-2024 Jan Nijtmans <nijtmans@users.sourceforge.net>
Copyright © 2002-2024 Andreas Kupries <andreas_kupries@users.sourceforge.net>
Copyright © 2003-2024 Paul Obermeier <obermeier@users.sourceforge.net>