Composite - image watermark to convert

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
vyoralek

Composite - image watermark to convert

Post by vyoralek »

Please what is convert equal for this:

Code: Select all

composite -dissolve 15 watermark.png input.jpg output.jpg
I try this:

Code: Select all

convert input.jpg watermark.png -compose dissolve -define compose:args=15 -composite output.jpg
but output image not same - not contain watermark image :(
vyoralek

Re: Composite - image watermark to convert

Post by vyoralek »

My problem may be caused by version... on my hosting is version 6.2.8 :(
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Composite - image watermark to convert

Post by anthony »

That should work as expected.

Okay the define option for convert was added in IM v6.5.3-4 so your IM is too old to specify compose arguments.

however you can still do it by doing the dissolve yourself.

Code: Select all

   convert input.jpg \
   \( watermark.png -matte -channel A -evaluate multiply 0.15 +channel \) \
               -composite  output.jpg
This multiplies the alpha channel of the overlay by 15% (make it mostly transparent) and then does a normal overlay.

Note a later version of IM would use -alpha set instead of -matte
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply