img-gif(3tk)

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

πŸ’– img-gif β€” Graphics Interchange Format (gif) πŸ’–

okay bestie, welcome to the Img manual, and specifically the lil corner of it that handles gifs. yes, those gifs. let's get into it πŸŽ€


✨ SYNOPSIS ✨

package require img::gif ?2.1?

🌸 DESCRIPTION 🌸

package require img::gif

So here's the thing β€” like every single package in Img, this one does not hand you any brand new commands. Nope. It does something way cuter: it extends the existing Tk command image, so that command suddenly understands files full of raster images in the Graphics Interchange Format (gif). To be super specific about it, img::gif extends Tk's photo image type. main character energy, honestly πŸ‘‘

The name of the new format handler is gif. This handler brings along some new additional configuration options. Peep the Options section below for the full tea.

And all of the above means that in a call like:

image create photo ?name? ?options?
  1. Image data in gif format (options -data and -file) is detected automatically. no input from you needed, it just knows ✨
  2. The format name gif is recognized by the option -format.

On top of that, the value of option -format is treated as a list and may contain any of the special options listed in the Options section. yes, it's giving multitasking πŸ’…

🚨 important bestie alert 🚨 The package img::gif is not loaded when you do package require Img. You have to load it explicitly, like:
package require img::gif

πŸ“ NOTES πŸ“

  1. Chapter Multi-page Images of of the Img manual page describes the handling of images with multiple pages. (yes that "of of" is real, we don't gatekeep, we just report 🫢)

πŸ’… OPTIONS πŸ’…

The handler provides the following options:

  • -verbose bool β€” This option is supported for reading and writing. Available since version 2.0. If set to true, additional information about the read or written image is printed to stdout. Default is false. (so like, if you're nosy, this one's for you πŸ™ˆ)
  • -index integer β€” This option is supported for reading only. Available since version 1.2.4. Read the page at specified index. The first page is at index 0. Default is 0. (yes bestie, pages start at zero, it's a whole thing 😭)

πŸ‘€ 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

like, the whole squad 🫢 go say hi to all of them.


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>

and that's the whole page bestie ✨ you just read img-gif, version 2.1, from the Img manual. slay, ate, no crumbs left. go make some gifs, you absolute icon πŸ‘‘πŸ’–

πŸ“¦ where this page comes from