Linux commands

From Organic Design
Revision as of 07:20, 20 April 2008 by Nad (talk | contribs) (Apply an opaque background of a specified colour to a directory of transparent PNG's)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

I'm starting a list of useful linux shell commands (generally "one liners") we use a lot

Apply an opaque background of a specified colour to a directory of transparent PNG's

  • This command requires ImageMagick to be installed
  • It loops through all PNG's in the CWD and puts them in a directory called processed which must exist
<bash>

perl -e 'qx "convert $_ -background \#00ff00 -flatten processed/$_" foreach glob "*.png"' </bash>