GIFTOOL(1)

πŸ’– GIFTOOL(1) πŸ’–

okay bestie, welcome to giftool from the GIFLIB Documentation set β€” it's the manual page for giftool, and it is literally a GIF transformation tool. sit down, hydrate, let's go 🧚✨


🌸 NAME 🌸

giftool β€” GIF transformation tool. that's it, that's the name, she's simple and she serves πŸ’…


✨ SYNOPSIS ✨

giftool [-a aspect] [-b bgcolor] [-d delaytime] [-i interlacing]
        [-n imagelist] [-p left,top] [-s width,height] [-t transcolor]
        [-u sort-flag] [-x disposal] [-z sort-flag]

πŸ¦‹ DESCRIPTION πŸ¦‹

so basically? it's a filter for transforming GIFS. and when you run it with no options at all, it's just an expensive copy of a GIF from standard input to standard output. like, iconic behavior honestly β€” you paid for the whole tool and got cat 😭 but no fr, options are what specify the filtering operations, and they get performed in the order specified on the command line. order matters, periodt.

πŸŽ€ the -n option (picking your faves)

the -n option selects images, which lets the tool act on just a subset of images inside a multi-image GIF. it takes a comma-separated list of decimal integers, and those are interpreted as 1-origin image indices β€” those are the images that will get acted on. if you don't pass -n at all, the tool selects and transforms all images. main character energy for every frame, i guess πŸ‘‘

πŸ’œ the -b option

the -b option takes a decimal integer argument and uses it to set the (0-origin) screen background color index.

πŸ”₯ the -f option (the format-string one, she's a lot)

the -f option accepts a printf-style format string and substitutes into it the values of image-descriptor and graphics-control fields. the string is formatted and output once for each selected image. normal C-style escapes \b, \f, \n, \r, \t, \v, and \xNN are interpreted; also \e produces ESC (ASCII 0x1b). and these are the format cookies you can substitute:

  • %a β€” pixel aspect byte.
  • %b β€” screen background color.
  • %d β€” image delay time
  • %h β€” image height (y dimension)
  • %n β€” image index
  • %p β€” image position (as an x,y pair)
  • %s β€” screen size (as an x,y pair)
  • %t β€” image transparent-color index
  • %u β€” image user-input flag (boolean)
  • %v β€” GIF version string
  • %w β€” image width (x dimension)
  • %x β€” image GIF89 disposal mode
  • %z β€” image's color table sort flag (boolean, false if no local color map)

🌈 boolean substitutions & their little prefixes

booleans can take a prefix that modifies how they're displayed, and honestly the way that works is so cute:

  • 1 β€” "1" or "0"
  • o β€” "on" or "off"
  • t β€” "t" or "f"
  • y β€” "yes" or "no"

so for example, "%oz" displays image sort flags using the strings "on" and "off". the default with no prefix is numeric. iykyk ✨

πŸ“ the -a option

the -a option takes an unsigned decimal integer argument and uses it to set the aspect-ratio bye in the logical screen descriptor block. (yes, the page really says "bye", we don't make the rules, we just report them πŸ’€)

πŸ’– the -b option, again, now with more detail

the -b option takes an unsigned decimal integer argument and uses it to set the background color index in the logical screen descriptor block.

⭐ the -d option

the -d option takes a decimal integer argument and uses it to set a delay time, in hundredths of a second, on selected images. hundredths!! not milliseconds, bestie, don't come for me.

🧚 the -i option

the -i option sets or clears interlacing in selected images. acceptable arguments are "1", "0", "yes", "no", "on", "off", "t", "f".

🌸 the -p option

the -p option takes a (0-origin) x,y coordinate-pair and sets it as the preferred upper-left-corner coordinates of selected images.

πŸ’… the -s option

the -s option takes a (0-origin) x,y coordinate-pair and sets it as the expected display screen size.

πŸ‘‘ the -t option

the -t option takes a decimal integer argument and uses it to set the (0-origin) index of the transparency color in selected images.

πŸ¦‹ the -u option

the -u option sets or clears the user-input flag in selected images. acceptable arguments are "1", "0", "yes", "no", "on", "off", "t", "f".

🌈 the -x option

the -x option takes a decimal integer argument and uses it to set the GIF89 disposal mode in selected images.

πŸŽ€ the -z option

the -z option sets or clears the color-table sort flag in selected images. acceptable arguments are "1", "0", "yes", "no", "on", "off", "t", "f".


⚠️ ok important note, bestie, listen up: the -a, -b, -p, -s, and -z options are included to complete the ability to modify all fields defined in the GIF standard, but should have no effect on how an image renders on browsers or modern viewers. so like… they're there for completeness, not for clout. don't expect the browser to notice πŸ™ˆ

πŸ’œ AUTHOR πŸ’œ

Eric S. Raymond.


GIFLIB Β· 3 June 2012 β€” that's the source and the date, and that's a wrap, babe 🫢 go transform some GIFs, you've got this πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from