Page 1 of 1
How to blend + translate simultaneously with Imagemagick?
Posted: 2015-09-05T07:37:09-07:00
by jhegedus42
Hi ImageMagick Community!
Any idea how I can shift two images and blend them at the
same time ?
I've illustrated this question
here with images.
Cheers,
Jozsef
Re: How to blend + translate simultaneously with Imagemagick?
Posted: 2015-09-05T07:59:06-07:00
by snibgo
The apples also need enlarging. There are many ways to do this. One is (Windows BAT syntax):
Code: Select all
convert ^
8BwgI.jpg ^
( VR76n.jpg ^
-resize 150%% ^
-alpha Opaque ^
-channel A -evaluate Multiply 0.5 +channel ^
-set page +1200+30 ^
) ^
-background White ^
-layers merge ^
a.png
Re: How to blend + translate simultaneously with Imagemagick?
Posted: 2015-09-05T08:06:06-07:00
by jhegedus42
Many thanks Snibgo, I try it.
Re: How to blend + translate simultaneously with Imagemagick?
Posted: 2015-09-05T08:07:07-07:00
by jhegedus42
I have a related question, is there a way to do
this blending trick in ImageMagick ?
Re: How to blend + translate simultaneously with Imagemagick?
Posted: 2015-09-05T08:17:52-07:00
by Bonzo
Yes; check out this link and a bit further up the page:
http://www.imagemagick.org/Usage/photos/#double
Re: How to blend + translate simultaneously with Imagemagick?
Posted: 2015-09-05T08:21:39-07:00
by jhegedus42
I tried this command :
Code: Select all
convert input02.jpg (input01.jpg -resize 150%% -alpha Opaque -channel A -evaluate Multiply 0.5 +channel -set page +1200+30) -background White -layers merge a.jpg
and it gave me an error like :
Code: Select all
./convert.sh: line 10: syntax error near unexpected token `('
./convert.sh: line 10: `convert input02.jpg (input01.jpg -resize 150%% -alpha Opaque -channel A -evaluate Multiply 0.5 +channel -set page +1200+30) -background White -layers merge a.jpg'
I wonder what is the corresponding syntax in Linux?
Re: How to blend + translate simultaneously with Imagemagick?
Posted: 2015-09-05T08:25:56-07:00
by snibgo
I had a space on each side of my parenthesis ( and ) . Why did you remove the spaces?
In Windows BAT, each % is (often) doubled. Not in bash.
Re: How to blend + translate simultaneously with Imagemagick?
Posted: 2015-09-05T08:42:05-07:00
by jhegedus42
Hi Snibgo,
I tried also this:
Code: Select all
convert input02.jpg ( input01.jpg -resize 150% -alpha Opaque -channel A -evaluate Multiply 0.5 +channel -set page +1200+30 ) -background White -layers merge a.jpg
Same error.
Re: How to blend + translate simultaneously with Imagemagick?
Posted: 2015-09-05T08:44:42-07:00
by jhegedus42
Code: Select all
convert input02.jpg \( input01.jpg -resize 150% -alpha Opaque -channel A -evaluate Multiply 0.5 +channel -set page +1200+30 \) -background White -layers merge a.jpg
run without error....
Re: How to blend + translate simultaneously with Imagemagick?
Posted: 2015-09-05T08:46:01-07:00
by jhegedus42
Magically it gives the wished result. Cool ! Thanks!
Re: How to blend + translate simultaneously with Imagemagick?
Posted: 2015-09-05T08:49:40-07:00
by jhegedus42
Re: How to blend + translate simultaneously with Imagemagick?
Posted: 2015-09-05T09:28:27-07:00
by Bonzo
As you have not told us how you are running the code we have to guess. Linux needs \( \) but windows only needs ( )
Re: How to blend + translate simultaneously with Imagemagick?
Posted: 2015-09-05T10:51:15-07:00
by fmw42
Always provide your version of IM and platform. It saves time and frustration due to syntax issues.
See the very top link on the User's forum, which is
viewtopic.php?f=1&t=9620
Re: How to blend + translate simultaneously with Imagemagick?
Posted: 2015-09-05T12:46:55-07:00
by jhegedus42
Many thanks for the tip, that page is also very useful.
Re: How to blend + translate simultaneously with Imagemagick?
Posted: 2015-09-05T12:48:19-07:00
by jhegedus42
fmw42 wrote:Always provide your version of IM and platform. It save time and frustration due to syntax issues.
See the very top link on the User's forum, which is
viewtopic.php?f=1&t=9620
Ok, I read it more carefully once more.