I try to explain my problem as best I can.
I have many bmp (about a game) such as this one http://imgur.com/sFGCDET
As you can see these pictures have the most unlikely possible colour as background colour (#FC00FC) because my objective is to make #FC00FC transparent.
My second objective is to make these pictures as light as possible.
According to my Fireworks installation, that would be in the order from lightest to heavier
PNG8 no transparency 5.54K
PNG8 index transparency 5.60K
PNG8 alpha transparency 5.61K
GIF no transparency 7.49K
GIF index transparency 7.49K
As far as I know the difference between index transparency and alpha transparency is that the first is like a switch, you pick one colour to be transparent, whereas alpha transparency is the "fading" effect - different levels of transparency - which is not at all required in my case.
So I was trying to find a "convert" command that would translate the bmps in PNG8s with index transparency.
I try
Code: Select all
for file in *.bmp
do
convert $file ${file%????}.png
done
100b.png 6160 B
which I am afraid is not PNG8 because if I try
Code: Select all
for file in *.bmp
do
convert $file PNG8:${file%????}.png
done
100b.png 6134 B
so I learn that I have to use the "PNG8:" part
Now I have the #FC00FC-to-transparent problem to solve.
I try
Code: Select all
for file in *.bmp
do
convert $file -transparent '#FC00FC' PNG8:${file%????}.png
done
convert: Invalid palette length `100b.png' @ png.c/PNGErrorHandler/1416.
What "convert" command should I use to get a PNG8 index transparency conversion?
Thanks in advance.