Short answer: Problem solved, it happens a lot of times, you are lost a long time and when you finally ask for help you find the solution really quick. Thanks anyway
Long answer:
fmw42, sorry if I didn't explain it right. I want to work with layers but finally I flatten the image. The image conversion is a part from a bigger python script so I've made a mistake, the final output image actually is a png, so it supports transparency.
About composition, I was working in IM like in Photoshop: every layer has its own composition method and you get your final image overlaying them. It seems IM works in a different way, you can only have ONE composition method active for all the layers (As you've pointed in your answer fmw42). This way, if I want to use different composition methods, I need to work step by step merging layers.
So, the final process is (I've removed certain parts for clarity):
Code: Select all
convert.exe original.png
-matte -background none ; first image (original) until here
( +clone -fill "#bfae3b" -colorize 100%) ; second image (color layer) creation.
-compose Multiply ; Set Multiply mode for layer merging
-layers merge ; At this point I have the colorized version of the original image as a single layer
-bordercolor white -border 5 ; Border added to the base image (layer 0)
( +clone -shadow 0.5x4+0+2 ) ; Second image (shadow) creation
+swap ; Only 2 layers, so simply swapping them to put the shadow at the bottom
-compose Over ; Change Multiply by simple overlay (Over)
-layers merge ; Final result
output.png ; Output file in png format to keep shadow transparency
anthony, thanks and done
.
One thing I think is very interesting about working with layers is the command -append. Yesterday I was lost mainly because I didn't see the result of my different swap and merge commands. Simply deleting the layer compositions and addind -append at the end of the script I got a vertical strip containing all the different layers. This way you can check your layer order and if its content is what you expected or not.
Here is the final result (adding an extra background and also modifying brightness/contrast wich are no included in the above script):
Again, thanks a lot for your answers and information.