Convert vs Mogrify - not workign for text overlay...

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
jaffamuffin
Posts: 59
Joined: 2009-01-30T03:46:08-07:00

Convert vs Mogrify - not workign for text overlay...

Post by jaffamuffin »

Hi all if I do this:

Code: Select all

convert spdob0002.tif -gravity "South" -draw "text 0,3 'Moshe and Friend'" output_file.jpg
I get an image with text printed at the bottom (not exactly what I want, but this is a test)

But if I do this:

Code: Select all

mogrify spdob0002.tif -gravity "South" -draw "text 0,3 'Moshe and Friend'"
I get no change to the original image.

I have managed to get text onto the image all sorts of ways using convert. As soon as I try to do it with mogrify I get no text... It seems to read an process the image, but no text.

Reason for using mogrify is to speed up the process (using file globbing)

On WinXP with IM : ImageMagick 6.4.9-3 2009-02-05 Q8 OpenMP http://www.imagemagick.org

What am I doing wrong, i thought mogrify was a drop in alternative to convert.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Convert vs Mogrify - not workign for text overlay...

Post by Bonzo »

Try putting the image at the end of the comand:

Code: Select all

mogrify -gravity "South" -draw "text 0,3 'Moshe and Friend'" spdob0002.tif 
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Convert vs Mogrify - not workign for text overlay...

Post by anthony »

jaffamuffin wrote:Hi all if I do this:

Code: Select all

convert spdob0002.tif -gravity "South" -draw "text 0,3 'Moshe and Friend'" output_file.jpg
I get an image with text printed at the bottom (not exactly what I want, but this is a test)
But that is what you requested with a gravity South!
But if I do this:

Code: Select all

mogrify spdob0002.tif -gravity "South" -draw "text 0,3 'Moshe and Friend'"
I get no change to the original image.
mogrify has the input/output image AT THE END!
What am I doing wrong, i thought mogrify was a drop in alternative to convert.
No not a drop in alternative. It is a "convert" alternative designed to process ONE and only ONE image at a time.. It does not have any image sequence/list operators, period. But then you are not using any of those, so that is okay.

See Mogrify NOT -- for a drop in convert replacement, as well as recursive sub-directory methods.
http://www.imagemagick.org/Usage/basics/#mogify_not

the area above also gives examples of annotating images.
http://www.imagemagick.org/Usage/basics/#mogrify
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply