-draw "image DstOver

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
Marcel1971a
Posts: 2
Joined: 2019-03-16T08:35:34-07:00
Authentication code: 1152

-draw "image DstOver

Post by Marcel1971a »

Hi, i am using an older version of IM 6.8.7-9 and used the -draw command to overlay to images.

Something like this:

Code: Select all

convert -background none -fill blue -font Arial -pointsize 42 label:A -draw "image DstOver 10,10 25,30 'rose:' " out.png
The A label will be on top of the rose image.

However, in the latest IM release the A label will always be behind the rose: image, not matter if i use DstOver or Over....

Can you comfirm this?

Regards,
Marcel
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: -draw "image DstOver

Post by fmw42 »

Your command works fine for me on IM 6.9.10.33 Q16 Mac OSX. The A is over the rose. What is your platform? What exact release are you calling the "current" one?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: -draw "image DstOver

Post by fmw42 »

Agreed, it does not work properly on IM 7.0.8.33 Q16 Mac OSX. The A is partially behind the rose. Please report this on the Bugs forum and link back to your topic here.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: -draw "image DstOver

Post by magick »

Thanks for the problem report. We can reproduce it and will have a patch to fix it in GIT master branch @ https://github.com/ImageMagick/ImageMagick later today. The patch will be available in the beta releases of ImageMagick @ https://www.imagemagick.org/download/beta/ by sometime tomorrow.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: -draw "image DstOver

Post by fmw42 »

Here is an alternate way to do this that works and probably the better way without -draw.

Code: Select all

magick -background none -fill blue -font Arial -pointsize 42 label:"A" \( rose: -resize 25x30! \) -geometry +10+10 -compose dstover -composite out.png
Marcel1971a
Posts: 2
Joined: 2019-03-16T08:35:34-07:00
Authentication code: 1152

Re: -draw "image DstOver

Post by Marcel1971a »

Thanks all for the quick response.
@frm42, i will have a look at your solution if it fits in my situation. Thanks for that code example.

Regards,
Marcel
Post Reply