how to set the opecity when composimg png files?
how to set the opecity when composimg png files?
how to set the top png file's opacity when it is composed on top to the background png file? like the same work in PS.
Re: how to set the opecity when composimg png files?
the command line below can set the opacity for top png when "-compose dissolve" :
convert 1.png 2.png -alpha on -compose dissolve -define compose:args=50 -composite hello.png
but there is no use when "-compose overlay" :
convert 1.png 2.png -alpha on -compose overlay -define compose:args=50 -composite hello.png
convert 1.png 2.png -alpha on -compose dissolve -define compose:args=50 -composite hello.png
but there is no use when "-compose overlay" :
convert 1.png 2.png -alpha on -compose overlay -define compose:args=50 -composite hello.png
Re: how to set the opecity when composimg png files?
refer to this post:
viewtopic.php?f=1&t=17503&p=65756&hilit=opacity#p65756
source psd file description:
source png files:
my code:
result: hello.png
the result is the same with the 1.png? why
viewtopic.php?f=1&t=17503&p=65756&hilit=opacity#p65756
source psd file description:
source png files:
my code:
Code: Select all
convert 1.png ( 2.png -alpha set -channel A -evaluate set 40% ) -compose overlay -composite hello.png
the result is the same with the 1.png? why
Last edited by linjuming on 2011-02-11T06:18:04-07:00, edited 2 times in total.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: how to set the opecity when composimg png files?
On windows you do not escape the ( ) with \, just use the parenthesis alone. Please read http://www.imagemagick.org/Usage/windows/
Re: how to set the opecity when composimg png files?
Thanks ,and why can not i create the right result using this code?
Code: Select all
convert 1.png ( 2.png -alpha set -channel A -evaluate set 40% ) -compose overlay -composite hello.png
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: how to set the opecity when composimg png files?
tryconvert 1.png ( 2.png -alpha set -channel A -evaluate set 40% ) -compose overlay -composite hello.png
convert 1.png ( 2.png -alpha set -channel A -evaluate set 40% ) -compose over -composite hello.png
You must have a space after ( and before ).
This works for me on my Mac/Unix system and looks similar to your PS result:
convert 1.png \( 2.png -alpha set -channel A -evaluate set 40% \) -compose over -composite result.png
Re: how to set the opecity when composimg png files?
convert 1.png ( 2.png -alpha set -channel A -evaluate set 40% ) -compose over -composite hello.png
result still as the same as 1.png
I made sure that space before and after ( ) ,the code is compeletely copyed from your code.
seems many problem running at my end ....
result still as the same as 1.png
I made sure that space before and after ( ) ,the code is compeletely copyed from your code.
seems many problem running at my end ....
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: how to set the opecity when composimg png files?
what version of IM are you using?
identify -version
identify -version
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: how to set the opecity when composimg png files?
run the command line in a command window by typing or pasting and not from a Bat file.
Re: how to set the opecity when composimg png files?
So,finally, it must be the problem with my text editor "notepad++".
by the way, what is the time at your end now? for sometimes i post probems at daytime but no one reply.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: how to set the opecity when composimg png files?
I am on the west coast of the US and the time now is 9 PM (GMT-8).
Re: how to set the opecity when composimg png files?
Thanks a million , now is 1 pm at my end.