LinuxCommandLibrary

ppmtogif

Convert PPM images to GIF format

TLDR

Convert PPM to GIF

$ ppmtogif [input.ppm] > [output.gif]
copy
With transparency
$ ppmtogif -transparent [color] [input.ppm] > [output.gif]
copy
Interlaced GIF
$ ppmtogif -interlace [input.ppm] > [output.gif]
copy
Animated GIF
$ pamtogif [frame1.ppm] [frame2.ppm] > [animated.gif]
copy

SYNOPSIS

ppmtogif [options] [ppmfile]

DESCRIPTION

ppmtogif converts PPM images to GIF format. GIF is limited to 256 colors, so use ppmquant first if needed. Superseded by pamtogif.
Part of Netpbm toolkit.

PARAMETERS

-transparent color

Make color transparent.
-interlace
Create interlaced GIF.
-sort
Sort colormap.
-map file
Use specified colormap.
-comment text
Add comment.

EXAMPLES

$ # Basic conversion
ppmtogif image.ppm > image.gif

# With transparency
ppmtogif -transparent white logo.ppm > logo.gif

# Quantize first for photos
ppmquant 256 photo.ppm | ppmtogif > photo.gif

# Interlaced for web
ppmtogif -interlace image.ppm > interlaced.gif

# From JPEG
jpegtopnm photo.jpg | ppmquant 256 | ppmtogif > photo.gif
copy

CAVEATS

GIF limited to 256 colors. Use ppmquant for more colors. Use pamtogif for animation.

HISTORY

ppmtogif is part of Netpbm by Jef Poskanzer, with LZW compression code by various contributors.

SEE ALSO

pamtogif(1), giftopnm(1), ppmquant(1), netpbm(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community