D
D
Dmitry Mushtat2012-11-09 01:56:18
linux
Dmitry Mushtat, 2012-11-09 01:56:18

Remove alpha channel from png pack?

Hello.
I'm trying to remove the alpha channel from a group of png files in a folder, and optimize if possible.
I have pngcrush, but somehow it didn't work. Perhaps someone faced similar problems. I will be glad to any feedback. Thank you.
Oh yes! Ubuntu 12.10

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Stdit, 2012-11-09
@Mushtat

This is how you can render all translucent pngs into folders on a black (or other) background using imagemagick:

find . -name "*.png" -exec convert {} -background black -flatten +matte {}.converted.png \;

In the case of 8-bit images, you may also need the -type palette switch.

I
ImperfectCadenca, 2012-11-09
@ImperfectCadenca

find /path/to/folder -name *.png -exec command_doing_the_necessary_action {} \;
instead of {} find will substitute the name of each file itself.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question