img-sun(3tk)

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

πŸ’– 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?
  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. πŸ‘‘

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:

  • -verbose bool β€” this one is supported for reading and writing, and it's been around since version 1.3. If you set it to true, extra information about the image you read or wrote gets printed to stdout. Default is false. So basically, do you want the receipts? πŸ“
  • -withalpha bool β€” supported for reading and writing, available since version 1.3. If you set it to false, the alpha channel gets ignored during reading or writing. Default is true. 🫢
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 πŸ’…
  • -compression string β€” this one is 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, assembled πŸ«‚πŸ’–


  • 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 the img-sun manual, version 2.1, living its life as img-sun(3tk). Go forth and rasterize βœ¨πŸŒžπŸ¦‹
πŸ“¦ where this page comes from