img-sgi(n)
π img-sgi(n) β the Silicon Graphics format, but make it a vibe π
okay bestie, sit down, hydrate, and let me tell you about img-sgi β it's the Img package's little love letter to the Silicon Graphics format, aka sgi. She's been in the group chat since forever and she is, lowkey, iconic. π¦
β¨ SYNOPSIS β¨
package require img::sgi ?2.1?
that's it. that's the whole summoning ritual. π―οΈ
πΈ DESCRIPTION πΈ
So first things first, bestie:
package require img::sgi
Like every single one of the Img packages, this one does not invent new commands. Not me making up new syntax, no ma'am. Instead it extends Tk's existing image command so that it can handle files holding raster images in the Silicon Graphics format (sgi). To be super specific: img::sgi extends Tk's photo image type.
Tk photo manual page for reference: https://www.tcl.tk/man/tcl9.0/TkCmd/photo.html
The name of the new format handler is sgi. This handler hands you some brand-new extra configuration options β the deets live down in the OPTIONS section, go peek. π
All of that means that in a call like
image create photo ?name? ?options?
the following is true, fr fr:
- Image data in
sgiformat (the options-dataand-file) gets detected automatically. She just knows. π - The format name
sgiis recognized by the option-format. Say her name and she comes running.
On top of that, the value of the option -format is treated as a list and may contain any of the special options listed in the OPTIONS section. So you can stack them, bestie.
Also, img::sgi is a sub-package of Img. You can load her two ways:
- as part of the complete Img support, via
package require Img - or on her own, via
package require img::sgi(independent queen energy π)
π SUPPORTED TYPES π
This format handler supports the following image types, and honestly? 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 those image types may be either uncompressed or run-length encoded. Choose your fighter. π₯
Now the receipts β who can read and who can write, split by -file and -data:
- 24-bit β Read
-file: Yes β¨ Read-data: Yes β¨ Write-file: Yes β¨ Write-data: Yes β¨ - 32-bit β Read
-file: Yes β¨ Read-data: Yes β¨ Write-file: Yes β¨ Write-data: Yes β¨ - 48-bit β Read
-file: Yes β¨ Read-data: Yes β¨ Write-file: No π Write-data: No π - 64-bit β Read
-file: Yes β¨ Read-data: Yes β¨ Write-file: No π Write-data: No π
so basically: she reads everything, but she only writes the 24-bit and 32-bit ones. The 48- and 64-bit girls are read-only, and that is simply the lore. π
π OPTIONS π
The handler provides the following options, and each one is a little moment:
-verbosebool β supported for reading and writing, and available since version 1.3. If set to true, additional information about the read or written image is printed tostdout. Default is false. (Turn it on when you want the tea. β)-withalphabool β supported for reading and writing, available since version 1.3. If set to false, an alpha channel is ignored during reading or writing. Default is true.
ngl, heads up: this option was named-mattein previous versions, and-matteis still recognized. She answers to both names, like a true icon. π«Ά
-compressionstring β supported for writing only, available since version 1.3. Set the compression mode to eithernoneorrle. Default isrle. Pick your poison, bestie. π
π SEE ALSO π
Go give these queens a follow, the whole squad:
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 π
- 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>
aaaand that's the whole page, bestie! this is img-sgi, version 2.1, hanging out under the Img umbrella in section n of the manual. mwah, go read some .sgi files, you absolute main character. πβ¨ππ¦πΈπ
π«Ά
π¦ 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