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.

INSTALL

sudo apt install netpbm
copy
sudo dnf install netpbm
copy
sudo pacman -S netpbm
copy
sudo apk add netpbm-extras
copy
sudo zypper install netpbm
copy
brew install netpbm
copy
nix profile install nixpkgs#netpbm
copy

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)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid