composite command - ImageMagick version 7

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
kammo
Posts: 3
Joined: 2016-05-07T01:29:53-07:00
Authentication code: 1151

composite command - ImageMagick version 7

Post by kammo »

Hi guys,

Our data centre has just upgraded ImageMagick to:
Version: ImageMagick 7.0.1-2 Q16 x86_64 2016-05-06

I've been using the following command successfully in version 6:

Code: Select all

composite -gravity SouthEast watermark.png wizard.jpg wizard.jpg
...this was overwriting wizard.jpg with a watermarked version

However in version 7 instead of creating the watermarked image it's outputting:
wizard-0.jpg (which is the watermark.png converted to jpg)
wizard-1.jpg (which is a copy of wizard.jpg)

Has the command changed?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: composite command - ImageMagick version 7

Post by fmw42 »

What platform?

I would suggest that you use the magick/convert .... -composite structure, which is much more flexible and current. Composite is an old legacy structure even for IM 6. See http://www.imagemagick.org/Usage/compose/#compose

Code: Select all

magick wizard.jpg watermark.png -gravity southeast -composite wizard.jpg
or

Code: Select all

convert wizard.jpg watermark.png -gravity southeast -composite wizard.jpg
You can also try the following. See http://www.imagemagick.org/Usage/compose/#compose

Code: Select all

magick composite -gravity SouthEast watermark.png wizard.jpg wizard.jpg
kammo
Posts: 3
Joined: 2016-05-07T01:29:53-07:00
Authentication code: 1151

Re: composite command - ImageMagick version 7

Post by kammo »

Thanks for the response.

Platform = Linux Centos 6.7

I just tried with the first 2 commands, but get the same output:
wizard-0.jpg
wizard-1.jpg

When trying magick composite I get this:

Code: Select all

magick composite -gravity SouthEast gray30.png wizard.jpg output.jpg
magick: unable to open image 'composite': No such file or directory @ error/blob.c/OpenBlob/2691.
magick: no decode delegate for this image format `' @ error/constitute.c/ReadImage/505.
magick: no image to apply a property "%w" @ warning/property.c/GetMagickPropertyLetter/2486.
magick: unknown image property "%w" @ warning/property.c/InterpretImageProperties/3399.
magick: no image to apply a property "%h" @ warning/property.c/GetMagickPropertyLetter/2378.
magick: unknown image property "%h" @ warning/property.c/InterpretImageProperties/3399.
magick: no image to apply a property "%m" @ warning/property.c/GetMagickPropertyLetter/2409.
magick: unknown image property "%m" @ warning/property.c/InterpretImageProperties/3399.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: composite command - ImageMagick version 7

Post by fmw42 »

Sorry, I forgot the -composite at the end of the first two commands. Corrected above. I have not been successful with the third command and this may be a bug.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: composite command - ImageMagick version 7

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 @ http://www.imagemagick.org/download/beta/ by sometime tomorrow.
kammo
Posts: 3
Joined: 2016-05-07T01:29:53-07:00
Authentication code: 1151

Re: composite command - ImageMagick version 7

Post by kammo »

The data centre rolled me back to version 6.9.3-10 Q16 so I didn't get a chance to retest with version 7 however, the "convert -composite" command and the original composite command that I was using are both working all OK again with version 6.9.

Many thanks for taking the time to help.
Post Reply