Page 1 of 1
New User: Convert Transparent PNG to Flattened PNG with white background
Posted: 2015-01-14T08:33:09-07:00
by rwallin
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
Re: New User: Convert Transparent PNG to Flattened PNG with white background
Posted: 2015-01-14T08:44:47-07:00
by snibgo
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.
Re: New User: Convert Transparent PNG to Flattened PNG with white background
Posted: 2015-01-14T10:48:25-07:00
by fmw42
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