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-zoptions 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
- arch rolling: giflib 6.1.3-2 Β· MIT
- fedora 44: giflib-utils 6.1.2-1.fc44 Β· MIT
- fedora 44: giflib-utils 6.1.3-2.fc44 Β· MIT
- nixpkgs unstable: giflib 6.1.3
- ubuntu stonking: giflib-tools 6.1.3-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms