img-sgi(3tk)

πŸ“¦
version 2.1.1 Β· 4 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

okay so bestie, this is img-sgi β€” it's the Silicon Graphics format handler, aka sgi. That's the whole name. Short, sweet, iconic. πŸ’…


✨ SYNOPSIS ✨

package require img::sgi ?2.1?

πŸ¦‹ DESCRIPTION πŸ¦‹

First things first, babes:

package require img::sgi

Now here's the tea. Like every single package in Img, this one does not hand you any brand-new commands. Nope. It extends the Tk command image you already know and love, so that it can read files holding raster images in the Silicon Graphics format (sgi). To be extra specific: img::sgi extends Tk's photo image type (that's https://www.tcl.tk/man/tcl9.0/TkCmd/photo.html if you wanna go look, iykyk).

The name of the new format handler is sgi. And this handler brings some new extra configuration options to the table. Scroll down to the Options section, I explain them all there. 🫢

So what does all that actually mean for you? It means that in a call like this:

image create photo ?name? ?options?
  1. Image data in sgi format (that's the -data and -file options) gets detected automatically. You don't have to do a thing. ✨
  2. The format name sgi is recognized by the -format option.

And bonus: the value of the -format option gets treated as a list, so it can contain any of the special options listed in the Options section. Versatile. Main character energy. πŸ‘‘

The package img::sgi is a sub-package of Img. You can load it as part of the complete Img support, like this:

package require Img

or all on its own, like this:

package require img::sgi

Either way, she's ready. πŸ’œ


🌈 SUPPORTED TYPES 🌈

This format handler supports the following image types, and honestly? Look at the range:

  • 24-bit pixels: Truecolor (RGB, 8-bit channels).
  • 32-bit pixels: Truecolor with alpha channel (RGBA, 8-bit channels).
  • 48-bit pixels: Truecolor (RGB, 16-bit channels).
  • 64-bit pixels: Truecolor with alpha channel (RGBA, 16-bit channels).

And every single one of these image types may be either uncompressed or run-length encoded. No cap.

Here's the whole compatibility grid, preserved exactly for you bestie:

        Type   |     Read      |     Write     |
               | -file | -data | -file | -data |
        ----------------------------------------
        24-bit | Yes   | Yes   | Yes   | Yes   |
        32-bit | Yes   | Yes   | Yes   | Yes   |
        48-bit | Yes   | Yes   | No    | No    |
        64-bit | Yes   | Yes   | No    | No    |
πŸ‘€ Notice how 48-bit and 64-bit are read-only? Reading: yes. Writing: no, on both -file and -data. Do not try it. That's the vibe check right there.

πŸ’… OPTIONS πŸ’…

The handler provides the following options, bestie. Three of them. We love a manageable list:

  • -verbose bool β€” supported for reading and writing. Available since version 1.3.

If you set it to true, extra info about the read or written image gets printed to stdout. Default is false.

  • -withalpha bool β€” supported for reading and writing. Available since version 1.3.

If you set it to false, an alpha channel gets ignored during reading or writing. Default is true.

πŸ“ Note: this option used to be named -matte in previous versions, and that old name is still recognized. Glow-up but she kept her old nickname. πŸ’–
  • -compression string β€” supported for writing only. Available since version 1.3.

Set the compression mode to either none or rle. Default is rle.


πŸŽ€ SEE ALSO πŸŽ€

Go read these too, bestie, the whole squad is here:

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 (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 and that's the whole page!! this was img-sgi, living in the Img manual, and this version is 2.1, dated img-sgi(3tk) style. slay, go read some 16-bit SGI files (but don't try to write them, we talked about this). bye bestie!! πŸ¦‹πŸ’–βœ¨πŸŒΈπŸ«Ά

πŸ“¦ where this page comes from