I'm running the following:
convert '/var/www/Standard Features.tif' '/var/www/Standard Features.jpg'
and for some reason I'm getting 2 files being created:
-rw-r--r-- 1 root root 31809 Jan 27 23:53 Standard Features-0.jpg
-rw-r--r-- 1 root root 20899 Jan 27 23:53 Standard Features-1.jpg
Why does this happen and how can I make it stop? I can't seem to figure out why this is happening. I've tried changing options and everything, but nothing seems to work.
convert in.tif -delete 0 out.jpg
or
convert in.tif -delete 1 out.jpg
You'll be trying to convert a multi-directory TIFF, which is translated to convert
's image stacks. The -delete
argument specifies stack indices to be deleted (when there is only one image left in the stack, only one image will be output).
Multi-directory TIFFs really do have multiple images, so you'd want to be careful about what you're actually discarding.
TIFF files can have multiple pages. GIF files can have multiple frames and PDF files can have multiple layers. Converting such will produce multiple outputs, one for each page/frame/layer.
If you only want one page/layer/frame of an image in ImageMagick, then just add [x] to your input file name. For example if you just want the first page of a TIFF, then
convert image.tiff[0] out.jpg
See Selecting Frames
If you want a series of pages, use [3-27] for example.
If using ImageMagick 7, replace convert with magick.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With