img-sun(n)

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

πŸ’– 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:

  1. Image data in sun format (that's the -data and -file options) gets detected automatically. no cap, it just knows. πŸ”
  2. The format name sun is recognized by the -format option. 🎯

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:

  • -verbose bool β€” supported for reading and writing. Available since version 1.3. If you set it to true, extra information about the read or written image gets printed to stdout. Default is false. (so like, quiet by default, chatty if you ask πŸ—£οΈ)
  • -withalpha bool β€” 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.
Note: this option was named -matte in previous versions and is still recognized. old name, same energy 🫢
  • -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 πŸ‘€

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 (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
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms