img-sun(3tk)
π NAME π
img-sun β the Sun raster format handler, aka sun π (yes bestie, this is the img-sun(3tk) page, we're doing this together)
π SYNOPSIS π
package require img::sun ?2.1?
π¦ DESCRIPTION π¦
Okay so first thing, the vibe check: package require img::sun π
Like literally every package in Img, this one does not invent new commands for you. Nope. What it does is extend the existing Tk image command so it can handle files with raster images in the Sun raster format (sun). More specifically, img::sun extends Tk's photo image type β 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 β full breakdown in the Options section, keep scrolling bestie π«Ά
So all of that means: in a call like
image create photo ?name? ?options?
- 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. π
And on top of that, the value of the -format option is treated as a list, and it may contain any of the special options listed in the Options section. It's giving multitasking icon behavior.
The package img::sun is a sub-package of Img π You can load it as part of the complete Img support with package require Img, or on its own with package require img::sun. Your choice, 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) π«§
And all image types may be either uncompressed or run-length encoded. Flexible fr fr.
Type | Read | Write |
| -file | -data | -file | -data |
----------------------------------------
1-bit | Yes | Yes | No | No |
8-bit | Yes | Yes | No | No |
24-bit | Yes | Yes | Yes | Yes |
32-bit | Yes | Yes | Yes | Yes |
Reading? Always slaying. Writing? Only the 24-bit and 32-bit girlies get to play π
β¨ OPTIONS β¨
The handler provides the following options:
-verbosebool β this one is supported for reading and writing, and it's been around since version1.3. If you set it totrue, extra information about the image you read or wrote gets printed tostdout. Default isfalse. So basically, do you want the receipts? π-withalphabool β supported for reading and writing, available since version1.3. If you set it tofalse, the alpha channel gets ignored during reading or writing. Default istrue. π«Ά
Note bestie: this option was named -matte in previous versions, and that name is still recognized. Glow-up but the old name still gets invited to the party π
-compressionstring β this one is 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, assembled π«π
π 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>
Aight that's the whole page bestie, no notes π This was theimg-sunmanual, version2.1, living its life asimg-sun(3tk). Go forth and rasterize β¨ππ¦
π¦ where this page comes from
- ubuntu resolute: libtk-img-doc 1:2.1.0+dfsg1-1 Β· Tcl
- ubuntu stonking: libtk-img-doc 1:2.1.1+dfsg1-2 Β· Tcl
- 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