I have a large number of png files (220k+) across many children folders within a single parent folder that may or may not be flattened. I need to recursively work through these folders and flatten all the transparent PNGs.
Can ImageMagick accommodate this?
Thanks in advance
Rodney
New User: Convert Transparent PNG to Flattened PNG with white background
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: New User: Convert Transparent PNG to Flattened PNG with white background
For recursing through directories, use a scripting language.
IM can operate on all files within a directory, but I generally use a script for this also.
IM can operate on all files within a directory, but I generally use a script for this also.
snibgo's IM pages: im.snibgo.com
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: New User: Convert Transparent PNG to Flattened PNG with white background
You can use mogrify to process all files in one directory. But it does not deal with subdirectories. So as snibgo said you will have to write a script to loop over all the subdirectories. You can then use either mogrify to process all images in each subdirectory or use convert to process each file in each subdirectory one at a time.
see
http://www.imagemagick.org/Usage/basics/
http://www.imagemagick.org/Usage/basics/#mogrify
see
http://www.imagemagick.org/Usage/basics/
http://www.imagemagick.org/Usage/basics/#mogrify