Drop shadow on watermark image

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
philmoz
Posts: 4
Joined: 2017-01-23T18:43:17-07:00
Authentication code: 1151

Re: Drop shadow on watermark image

Post by philmoz »

Thanks. I think there is a problem with -gravity center as well.
Example - this command:

Code: Select all

convert background.png foreground.png -background none -gravity center -composite merged.png
In 6.9.7-3 this centers the foreground image on the background image.
In 7.0.4-5 the foreground is placed in the top left corner.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Drop shadow on watermark image

Post by fmw42 »

Works fine for me in IM 7.0.4-5 Q16 Mac OSX

Code: Select all

magick logo: rose: -gravity center -composite tmp7.png
Perhaps one of your two input images have a virtual canvas with offset. Try adding +repage after reading the two images.
philmoz
Posts: 4
Joined: 2017-01-23T18:43:17-07:00
Authentication code: 1151

Re: Drop shadow on watermark image

Post by philmoz »

Images are simple PNG files. Adding +repage has no effect
The 'magick logo: rose: -gravity center -composite tmp7.png' works for me as well; but convert does not.
philmoz
Posts: 4
Joined: 2017-01-23T18:43:17-07:00
Authentication code: 1151

Re: Drop shadow on watermark image

Post by philmoz »

This is weird.
The following commands produce different results in 7.0.4-5 on OS X, even though the 'convert' app is just s symlink to 'magick'.

Code: Select all

convert background.png foreground.png -background none -gravity center -composite merged.png

Code: Select all

magick background.png foreground.png -background none -gravity center -composite merged.png
The 'magick' command properly centers the foreground image; but 'convert' places it in the top left corner.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Drop shadow on watermark image

Post by fmw42 »

There does seem to be a bug using "magick convert". Using just magick or just convert work fine. I submitted a bug report at viewtopic.php?f=3&t=31284
Post Reply