img-ps(n)
β¨ NAME β¨
img-ps β the PostScript and PDF format handler (ps), living its best life inside the Img package family π
β¨
πΈ SYNOPSIS πΈ
package require img::ps ?2.1?
π DESCRIPTION π
package require img::ps
okay so bestie, here's the tea π« β like every single package in Img, this one does not hand you brand new commands. It's not that kind of girl. Instead it extends the Tk command image, so that command suddenly understands files holding raster images in PostScript and PDF format (ps). More specifically, img::ps extends Tk's photo image type (https://www.tcl.tk/man/tcl9.0/TkCmd/photo.html). no cap, it just quietly makes photo more powerful π
The name of the new format handler is ps. This handler is serving new additional configuration options. Scroll down to the Options section for the full breakdown, iykyk π
Also note (and this is important, don't skip it π): 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. twins fr fr π«Ά
The package delegates the actual conversion of data in PostScript and PDF format into a raster image to the GhostScript application. So yeah β it depends on the presence of program gs on Unix and gswin64c.exe in environment variable PATH, and it is non-functional if GhostScript is not installed. it's giving "no gs, no art" π
All of the above means that in a call like
image create photo ?name? ?options?
- Image data in PostScript and PDF format (options
-dataand-file) is detected automatically. automatic detection? she ate π₯ - The format names
psandpdfare recognized by the option-format. iconic.
In addition, the value for the option is treated as a list and may contain any of the special options listed in section Options. yes, a whole list, she's flexible like that β¨
The package img::ps is not loaded when doing a package require Img β nope, she does not come as a package deal. She must be loaded explicitly via package require img::ps. main character energy only π
π NOTES π
- This format handler only supports read functionality. she reads, she does not write. periodt.
- Chapter Multi-page Images of the Img manual page describes the handling of images with multiple pages. (yes, pages, plural, we stan a multi-page moment π)
- This format handler only supports a limited number of file types, so listen up:
- PostScript files must have keyword
%%BoundingBoxin the file header. The syntax%%BoundingBox (atend)is not supported. so if you were hoping, bestie... no π - PDF files are assumed to be of size DIN A4. It is recommend to use a specialized PDF extension like tclMuPDF (
https://sourceforge.net/projects/irrational-numbers/files/tclMuPDF-2.x/). like, she's doing her best with A4, but for real PDF work get the specialist π¦
- PostScript files must have keyword
π OPTIONS π
The handler provides the following options:
-verbose boolβ Available since version2.0. If set totrue, additional information about the read image is printed tostdout. Default isfalse. she's chatty when you ask her to be π£οΈβ¨-index integerβ Available since version1.2.4. Read the page at specified index. The first page is at index0. Default is0. page zero is the vibe, don't forget it π-zoom x ?y?β Available since version1.2.4. Scale image by specified double values. Ifyis not specified, it is set to the value ofx. Default is1.0. zoom in, zoom out, glow up π-gs stringβ Available since version2.0. Specify the GhostScript executable program as absolute path. tell her exactly wheregslives, she'll find it π
π SEE ALSO π
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
the whole squad, honestly ππ
π COPYRIGHT π
Copyright (c) 1995-2025 Jan Nijtmans <nijtmans@users.sourceforge.net>
Copyright (c) 2002-2025 Andreas Kupries <andreas_kupries@users.sourceforge.net>
Copyright (c) 2003-2025 Paul Obermeier <obermeier@users.sourceforge.net>
okay that's the whole page bestie, you're officially caught up π
and btw this was img-ps version 2.1, from the Img manual, with the copyright years rolling all the way through 2025 β so like, go package require img::ps and slay πβ¨π
π¦ where this page comes from
- fedora 43: tkimg 2.1.1-1.fc43 Β· TCL AND libtiff AND HPND-Pbmplus AND URT-RLE AND IJG AND libpng-2.0 AND libpng-1.6.35 AND (BSD-4-Clause OR GPL-2.0-or-later) AND BSD-4-Clause AND MIT AND Zlib
- fedora 43: tkimg 2.1.1-1.fc43 Β· TCL AND libtiff AND HPND-Pbmplus AND URT-RLE AND IJG AND libpng-2.0 AND libpng-1.6.35 AND (BSD-4-Clause OR GPL-2.0-or-later) AND BSD-4-Clause AND MIT AND Zlib
- fedora 44: tkimg 2.1.0-2.fc44 Β· TCL AND libtiff AND HPND-Pbmplus AND URT-RLE AND IJG AND libpng-2.0 AND libpng-1.6.35 AND (BSD-4-Clause OR GPL-2.0-or-later) AND BSD-4-Clause AND MIT AND Zlib
- fedora 44: tkimg 2.1.0-2.fc44 Β· TCL AND libtiff AND HPND-Pbmplus AND URT-RLE AND IJG AND libpng-2.0 AND libpng-1.6.35 AND (BSD-4-Clause OR GPL-2.0-or-later) AND BSD-4-Clause AND MIT AND Zlib
- fedora 44: tkimg 2.1.1-1.fc44 Β· TCL AND libtiff AND HPND-Pbmplus AND URT-RLE AND IJG AND libpng-2.0 AND libpng-1.6.35 AND (BSD-4-Clause OR GPL-2.0-or-later) AND BSD-4-Clause AND MIT AND Zlib
- fedora 44: tkimg 2.1.1-1.fc44 Β· TCL AND libtiff AND HPND-Pbmplus AND URT-RLE AND IJG AND libpng-2.0 AND libpng-1.6.35 AND (BSD-4-Clause OR GPL-2.0-or-later) AND BSD-4-Clause AND MIT AND Zlib
- nixos 26.05: tkimg 2.1.1
- nixpkgs unstable: tkimg 2.1.1
- Copyright (c) 1995-2025 Jan Nijtmans <nijtmans@users\&.sourceforge\&.net>
- Copyright (c) 2002-2025 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
- Copyright (c) 2003-2025 Paul Obermeier <obermeier@users\&.sourceforge\&.net>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms