Mogrify compose

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
sfg
Posts: 17
Joined: 2009-12-30T13:44:31-07:00
Authentication code: 8675309

Mogrify compose

Post by sfg »

Hi,

Couple of years ago I was using this line:

Code: Select all

mogrify -format png -alpha off -bordercolor Black -border 1 -alpha on *.png
to add a 1 pixel Black border around all the images in a folder while maintaining their transparency. Now it's not working anymore, the transparency is filled with black.

I looked a bit and found about the Compose option and I tried this:

Code: Select all

mogrify -bordercolor black -compose Copy -border 1 *.png
However, it's not working. I get this error:

Code: Select all

mogrify: unrecognized option `-compose' @ error/mogrify.c/MogrifyImageCommand/45
06.
Compose is listed as an option here: https://www.imagemagick.org/script/mogrify.php

What am I doing wrong?
Also, any other option to create 1 pixel border around the images and keep their transparency? Note that the border can't be drawn on the image itself, it should be on the "outside", basically increasing the image by 2 pixels on both the vertical and the horizontal.

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

Re: Mogrify compose

Post by fmw42 »

Please, always provide your IM version and platform when asking questions, since syntax may differ. Also provide your exact command line and if possible your images.

See the top-most post in this forum "IMPORTANT: Please Read This FIRST Before Posting" at http://www.imagemagick.org/discourse-se ... f=1&t=9620

If using Imagemagick 7, then see http://imagemagick.org/script/porting.php#cli

For novices, see

http://www.imagemagick.org/discourse-se ... f=1&t=9620
http://www.imagemagick.org/script/comma ... essing.php
http://www.imagemagick.org/Usage/reference.html
http://www.imagemagick.org/Usage/
https://github.com/ImageMagick/usage-markdown
Post Reply