img-sun(n)
π NAME π
img-sun β the Sun raster format handler (aka sun), living its best life inside Img.
β¨ SYNOPSIS β¨
package require img::sun ?2.1?
π¦ DESCRIPTION π¦
okay so first things first: package require img::sun π
Like literally every other package in Img, this one is not out here inventing new commands. Nope. What it does is extend the existing Tk command image, so that command suddenly understands files holding raster images in the Sun raster format (sun). More specifically, img::sun extends Tk's photo image type β you know, the one documented over at https://www.tcl.tk/man/tcl9.0/TkCmd/photo.html.
The name of the new format handler is sun. This handler brings some new extra configuration options to the table. Peep the OPTIONS section for the full tea. β
All of that means that in a call like
image create photo ?name? ?options?
here's what goes down:
- Image data in
sunformat (that's the-dataand-fileoptions) gets detected automatically. no cap, it just knows. π - The format name
sunis recognized by the-formatoption. π―
On top of that, the value of the -format option is treated as a list and may contain any of the special options listed in the OPTIONS section. so you can stack them in there, bestie.
And jsyk: the package img::sun is a sub-package of Img. You can load it as part of the whole complete Img support situation, via package require Img, or you can pull it up all on its own, via package require img::sun. main character energy either way π
π SUPPORTED TYPES π
This format handler supports the following image types:
- 1-bit pixels: Black and White. π€π€
- 8-bit pixels: Grayscale or indexed. π«οΈ
- 24-bit pixels: Truecolor (RGB, 8-bit channels). πΊ
- 32-bit pixels: Truecolor with alpha channel (RGBA, 8-bit channels). β¨
All images types may be either uncompressed or run-length encoded.
Here's the whole read/write situation, broken down for you because tables are so not the vibe:
- 1-bit β read
-file: Yes | read-data: Yes | write-file: No | write-data: No - 8-bit β read
-file: Yes | read-data: Yes | write-file: No | write-data: No - 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
π OPTIONS π
The handler provides the following options:
-verbosebool β supported for reading and writing. Available since version1.3. If you set it to true, extra information about the read or written image gets printed tostdout. Default isfalse. (so like, quiet by default, chatty if you ask π£οΈ)-withalphabool β supported for reading and writing. Available since version1.3. If set to false, an alpha channel is ignored during reading or writing. Default istrue.
Note: this option was named -matte in previous versions and is still recognized. old name, same energy π«Ά
-compressionstring β supported for writing only. Available since version1.3. Set the compression mode to eithernoneorrle. Default isrle. ποΈ
π 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 friend group fr fr π)
π 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 π§β¨ this was img-sun, version 2.1 β thanks for coming to my ted talk, ily, go make some iconic sun raster images ππ
π¦ 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