LinuxCommandLibrary

ppmfade

Fade between PPM images

TLDR

Generate a transition between two PPM images ([f]irst and [l]ast) using the specified effect

$ ppmfade -f [path/to/image1.ppm] -l [path/to/image2.ppm] -[mix|spread|shift|relief|oil|...]
copy

Generate a transition starting with the specified image and ending in a solid black image
$ ppmfade -f [path/to/image.ppm] -[mix|spread|shift|relief|oil|...]
copy

Generate a transition starting with a solid black image and ending with the specified image
$ ppmfade -l [path/to/image.ppm] -[mix|spread|shift|relief|oil|...]
copy

Store the resulting images in files named base.NNNN.ppm where NNNN is a increasing number
$ ppmfade -f [path/to/image1.ppm] -l [path/to/image2.ppm] -[mix|spread|shift|relief|oil|...] -base [base]
copy

SYNOPSIS

ppmfade [-frames N] [-linear] [-maxmaxval M] start_spec end_spec

PARAMETERS

-frames N
    Specifies the number of output images (frames) to generate during the fade. The default is 25 frames.

-linear
    Forces a linear fade progression. By default, ppmfade uses a non-linear, perceptually smoother fade.

-maxmaxval M
    Sets the maximum color value (maxval) for the output images. Default matches the input image's maxval.

start_spec
    The starting point for the fade. Can be a PPM image file path (or '-' for standard input) or a color specification (e.g., 'red', '#FF0000').

end_spec
    The ending point for the fade. Can be a PPM image file path or a color specification.

DESCRIPTION

ppmfade is a Netpbm utility that generates a sequence of Portable Pixmap (PPM) images, simulating a fade effect. It can fade from one PPM image to another, from an image to a specified color, or from a color to an image. The generated images are written to standard output, making ppmfade ideal for piping into other programs that create animations (e.g., ppmtompeg or display sequences of images). Users can control the number of frames in the fade and whether the fade progresses linearly or perceptually.

CAVEATS

Output is always written to standard output; it's designed for piping, not direct file creation.
Input images must be in PPM format. Other Netpbm tools like anytopnm can convert various formats to PPM.
The command itself does not create video files; it generates image sequences that must be further processed.

INPUT AND OUTPUT

Ppmfade processes its inputs (either two image files, or one image and one color specification) and writes the resulting sequence of PPM images to standard output. This streaming design is fundamental to the Netpbm philosophy, enabling powerful command-line pipelines for complex image processing tasks.

COLOR SPECIFICATION

Colors can be specified by common color names (e.g., 'blue', 'green') or as a hexadecimal RGB triplet (e.g., '#0000FF' for blue). Netpbm uses an internal color database to resolve named colors.

HISTORY

Ppmfade is an integral part of the Netpbm project, a comprehensive suite of graphics manipulation tools. Netpbm originated from PBMplus, developed by Jef Poskanzer, and has evolved into a widely used open-source collection for processing various image formats, particularly through command-line piping. Ppmfade's purpose has consistently been to provide a flexible and efficient way to generate intermediate frames for animation or visual transitions.

SEE ALSO

ppm(5), ppmtompeg(1), pnmgamma(1), animate(1)

Copied to clipboard