In convert what is equivalent of composite'disslove

Magick++ is an object-oriented C++ interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick++.
Post Reply
needkane
Posts: 47
Joined: 2014-09-11T02:19:30-07:00
Authentication code: 6789

In convert what is equivalent of composite'disslove

Post by needkane »

I use magic command-line-tools to let a gif file have watermark.
composite is failure,I use convert is ok.
I want the watermark can dissolve,
looks like the source image:
http://qiniuphotos.qiniudn.com/gogopher ... x/20/dy/20
But convert doesn't have dissovle
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: In convert what is equivalent of composite'disslove

Post by snibgo »

See "convert ... -compose dissolve" at http://www.imagemagick.org/Usage/compose/#dissolve
snibgo's IM pages: im.snibgo.com
needkane
Posts: 47
Joined: 2014-09-11T02:19:30-07:00
Authentication code: 6789

Re: In convert what is equivalent of composite'disslove

Post by needkane »

Thanks for your reply,but the answer is wrong.
Now i give you a picture and a watermark,could you help me generate a result which i want.
If you can ,please show your command.
Source picture: http://needkane.qiniudn.com/draw.gif
Watermark: http://needkane.qiniudn.com/p.png
I want the result: http://needkane.qiniudn.com/draw2
needkane
Posts: 47
Joined: 2014-09-11T02:19:30-07:00
Authentication code: 6789

Re: In convert what is equivalent of composite'disslove

Post by needkane »

snibgo wrote:See "convert ... -compose dissolve" at http://www.imagemagick.org/Usage/compose/#dissolve
Thanks for your reply,but the answer is wrong.
Now i give you a picture and a watermark,could you help me generate a result which i want.
If you can ,please show your command.
Source picture: http://needkane.qiniudn.com/draw.gif
Watermark: http://needkane.qiniudn.com/p.png
I want the result: http://needkane.qiniudn.com/draw2
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: In convert what is equivalent of composite'disslove

Post by fmw42 »

In command line, see -compose modulate as the equivalent of watermark.

http://www.imagemagick.org/script/compose.php
http://www.imagemagick.org/Usage/compose/#watermark

Sorry I do not know Magick++ (equivalents).
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: In convert what is equivalent of composite'disslove

Post by snibgo »

There are many ways to do this. Here is one. Windows syntax.

Code: Select all

convert ^
  draw.gif ^
  -layers coalesce ^
  NULL: ^
  ( p.png -alpha set -channel A -evaluate multiply 0.5 +channel ) ^
  -layers composite ^
  d2.gif
snibgo's IM pages: im.snibgo.com
needkane
Posts: 47
Joined: 2014-09-11T02:19:30-07:00
Authentication code: 6789

Re: In convert what is equivalent of composite'disslove

Post by needkane »

snibgo wrote:There are many ways to do this. Here is one. Windows syntax.

Code: Select all

convert ^
  draw.gif ^
  -layers coalesce ^
  NULL: ^
  ( p.png -alpha set -channel A -evaluate multiply 0.5 +channel ) ^
  -layers composite ^
  d2.gif
Thank you very much,it's ok now
needkane
Posts: 47
Joined: 2014-09-11T02:19:30-07:00
Authentication code: 6789

Re: In convert what is equivalent of composite'disslove

Post by needkane »

snibgo wrote:There are many ways to do this. Here is one. Windows syntax.

Code: Select all

convert ^
  draw.gif ^
  -layers coalesce ^
  NULL: ^
  ( p.png -alpha set -channel A -evaluate multiply 0.5 +channel ) ^
  -layers composite ^
  d2.gif
Could you help resolve the problem,use one line command complete
Text watermark also can disslove.
http://qiniuphotos.qiniudn.com/gogopher ... x/20/dy/20
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: In convert what is equivalent of composite'disslove

Post by fmw42 »

What version of IM and what platform are you using?

This works for me. You need to use -layers composite not -composite and you need the NULL:

Unix

Code: Select all

convert draw.gif -coalesce NULL: \
p.png -gravity center -define compose:args=50x100 \
-compose dissolve -layers composite -layers optimize \
draw2.gif

Windows (I think)

Code: Select all

convert draw.gif -coalesce NULL: ^
p.png -gravity center -define compose:args=50x100 ^
-compose dissolve -layers composite -layers optimize ^
draw2.gif
I do not know the Magick++ equivalent.
needkane
Posts: 47
Joined: 2014-09-11T02:19:30-07:00
Authentication code: 6789

Re: In convert what is equivalent of composite'disslove

Post by needkane »

fmw42 wrote:What version of IM and what platform are you using?

This works for me. You need to use -layers composite not -composite and you need the NULL:

Unix

Code: Select all

convert draw.gif -coalesce NULL: \
p.png -gravity center -define compose:args=50x100 \
-compose dissolve -layers composite -layers optimize \
draw2.gif

Windows (I think)

Code: Select all

convert draw.gif -coalesce NULL: ^
p.png -gravity center -define compose:args=50x100 ^
-compose dissolve -layers composite -layers optimize ^
draw2.gif
I do not know the Magick++ equivalent.
Sir.you understand is wrong ,the watermark is word not photo
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: In convert what is equivalent of composite'disslove

Post by fmw42 »

You did not provide a text image, but only the circle. You need to create a watermark image with text or create it in the command line.

Try this:

Code: Select all

convert draw.gif -coalesce NULL: \
\( -background none -fill white -pointsize 24 label:"TESTING" \) -gravity center -define compose:args=50x100 \
-compose dissolve -layers composite -layers optimize \
draw2.gif
see
http://www.imagemagick.org/Usage/anim_mods/#compose
JulietLindl
Posts: 3
Joined: 2014-10-03T13:38:58-07:00
Authentication code: 6789

Re: In convert what is equivalent of composite'disslove

Post by JulietLindl »

snibgo wrote:There are many ways to do this. Here is one. Windows syntax.

Code: Select all

convert ^
  draw.gif ^
  -layers coalesce ^
  NULL: ^
  ( p.png -alpha set -channel A -evaluate multiply 0.5 +channel ) ^
  -layers composite ^
  d2.gif
I tried the command line way, but couldn't get it done. The Windows syntax worked for me, thank snibgo
Juliet
Post Reply