LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

ppmshadow

Add drop shadow effect to PPM images

TLDR

Add a default drop shadow
$ ppmshadow [input.ppm] > [output.ppm]
copy
Specify blur radius for shadow softness
$ ppmshadow -b [8] [input.ppm] > [output.ppm]
copy
Specify shadow offset direction
$ ppmshadow -x [5] -y [5] [input.ppm] > [output.ppm]
copy
Create a translucent shadow
$ ppmshadow -t [input.ppm] > [output.ppm]
copy

SYNOPSIS

ppmshadow [options] [file]

DESCRIPTION

ppmshadow adds a drop shadow effect to a PPM image, creating the appearance of the image floating above a background. The shadow is created by blurring a darkened copy of the image and placing it offset behind the original.The blur radius controls shadow softness, while x and y offsets control the apparent light direction. The -t option creates a translucent shadow that allows the background to show through. Part of the Netpbm toolkit.The input image must have a transparent (black) background area for the shadow to be visible. The output image is larger than the input by the shadow offset.

PARAMETERS

FILE

Input PPM file. Reads from stdin if omitted.
-b N
Blur radius controlling shadow softness (default: 11).
-x N
Horizontal shadow offset in pixels (default: blur radius / 2).
-y N
Vertical shadow offset in pixels (default: same as -x).
-t
Create a translucent shadow instead of a solid black one.

CAVEATS

Requires the image to have a transparent (black) background around the subject for the shadow to appear correctly. Internally uses pnmconvol for blurring, which can be slow for large blur radii. Part of the Netpbm suite.

HISTORY

ppmshadow was created by John Walker as part of the Netpbm toolkit for image shadow effect generation.

SEE ALSO

ppm(5), pnmcomp(1), netpbm(1), pnmconvol(1)

Copied to clipboard
Kai