Convert/Mogrify questions

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
ebzzry

Convert/Mogrify questions

Post by ebzzry »

I'm curious, why does convert/mogrify generate these odd-looking filenames when I use it.
They are labeled with "-0" and "-1" before the extension name.

When I run the command:

Code: Select all

mogrify -format jpeg file.tif
I get the following files:

Code: Select all

file-0.jpeg
file-1.jpeg
The one with "-1" is a small thumbnail-like version.

Is this behavior expected? By the way, I'm using the latest Windows build.
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Re: Convert/Mogrify questions

Post by el_supremo »

The TIFF file must have multiple frames in it. JPG format can't handle multiple frames so IM writes the two as separate files.
If you use the identify command it should list two lines of info, rather than the usual one, like this:

Code: Select all

 identify file.tif
file.tif[0] TIFF 70x46 70x46+0+0 8-bit DirectClass 20KB 0.000u 0:00.016
file.tif[1] TIFF 70x46 70x46+0+0 8-bit DirectClass 20KB 0.000u 0:00.000
Pete
Sorry, my ISP shutdown all personal webspace so my MagickWand Examples in C is offline.
See my message in this topic for a link to a zip of all the files.
ebzzry

Re: Convert/Mogrify questions

Post by ebzzry »

I'll read more about the topic to know more about it.

Thanks for the enlightenment.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Convert/Mogrify questions

Post by anthony »

See IM Examples, Image File Handling, Writing a Multi-Image Sequence - Adjoin Techniques
http://www.imagemagick.org/Usage/files/#adjoin
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply