img-ps(n)

πŸ“¦
version 2.1.1 Β· 2 versions
, in fedora 43, fedora 44, nixos 26.05, nixpkgs unstable

✨ 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?
  1. Image data in PostScript and PDF format (options -data and -file) is detected automatically. automatic detection? she ate πŸ”₯
  2. The format names ps and pdf are 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 πŸ“

  1. This format handler only supports read functionality. she reads, she does not write. periodt.
  2. 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 🌈)
  3. This format handler only supports a limited number of file types, so listen up:
    • PostScript files must have keyword %%BoundingBox in 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 πŸ¦‹

πŸ’… OPTIONS πŸ’…

The handler provides the following options:

  • -verbose bool β€” Available since version 2.0. If set to true, additional information about the read image is printed to stdout. Default is false. she's chatty when you ask her to be πŸ—£οΈβœ¨
  • -index integer β€” Available since version 1.2.4. Read the page at specified index. The first page is at index 0. Default is 0. page zero is the vibe, don't forget it πŸ’œ
  • -zoom x ?y? β€” 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. zoom in, zoom out, glow up πŸ”
  • -gs string β€” Available since version 2.0. Specify the GhostScript executable program as absolute path. tell her exactly where gs lives, 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 (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
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms