fmw42 wrote:To change a layer's opacity
convert a.png[3] -channel a -evaluate set 50% +channel result_layer3.png
that will make the 4th layer of a.png 50% transparent. (Layers in IM start with 0, nominally)
Thanks, the first example is clear, but this one confuses me.
1. What is a.png[3]? Is it an image sequence operator? I am processing image sequences, but I will process them line by line, not using [n] brackets, just convert.exe a0123.png b1234.png etc. Do I need a[3]?
2. What is +channel result_layer3.png? I would prefer to do everything like:
Code: Select all
convert a.png \( b.png -rotate 90 \) c.png d.png -background transparent -flatten out.png
Is it possible to do so with this transparency command? For me it seems that it is saving a temporary file "result_layer3.png". What I am looking for is a command like this:
Code: Select all
convert a.png \( b.png -opacity 50 \) c.png d.png -background transparent -flatten out.png
is there such a command?
3. Are you sure that "set" operation is presaving the alpha information? For me it seems from the documentation that it sets a solid color (or grey value) for all the layer, discarding the information presented in the layer. What I would like is that when it is at 0 (or 100, all programs call it different), then the result is the original image file. If it is at 100 then the result is a totally transparent image. And when it is between 1 and 99 then the result is the original image's alpha channel, multiplied by a value between 0 and 1. Should I use "-evaluate multiply 0.5"?