Page 1 of 1

PNG semi-transparency problem

Posted: 2008-11-21T06:12:31-07:00
by vtv
Hi.
Could someone help me with using IM to colorize png file and save semi-transparency?
I was using mvg to create complex images that include text images thumbnails and other things. Now I need to add label that can be different shape with transparency and semi-transparency. PNG files are just great for this - designer have to give me png file and I can create different manipulations with it. Now I got a problem - I need to give a possibility to change label color on my complex image. I understand that with mvg this is probably impossible, so I'm going to use regular command line commands and -draw option.
The problem is that when applying something like

Code: Select all

-fill blue -colorize 50%
it will also change transparency and semi-transparency of the label png file to some color. I need to keep transparency though.
Is there way to do that?

Re: PNG semi-transparency problem

Posted: 2008-11-21T11:48:39-07:00
by fmw42
Can you post an example?

your probably need to specify -channel rgb before your command and possibly re-enable the alpha afterwards using -alpha. An example would help pin it down.

Re: PNG semi-transparency problem

Posted: 2008-11-21T15:07:43-07:00
by vtv
solution found.

This how it works fine.

Code: Select all

convert -respect-parenthesis -size 540x190 xc:rgb(255,255,255) ( -page +0+0 1.png -fill green -tint 100% ) -flatten result.jpg

Re: PNG semi-transparency problem

Posted: 2008-11-23T01:15:30-07:00
by anthony
Nothing about that solution involved MVG. MVG is purely the syntax for the -draw command.