Convert any file type to .tiff while using highest quality settings.

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
josephs
Posts: 36
Joined: 2014-04-08T10:13:43-07:00
Authentication code: 6789

Convert any file type to .tiff while using highest quality settings.

Post by josephs » 2017-11-28T14:15:22-07:00

Hi all,

What would be a simple way to convert any image type, without knowing the type (jpg, png, etc..) to .tiff and maintaining the highest quality settings possible from the original file. I will know path of the single image to be converted, but not the image type.

Im using MS DOS with ImageMagick-6.9.3-Q16-HDRI. But I am not to concerned about specific format. I can usually figure that out if I know the right command structure.

Im assuming it will involve mogrify and -format. Not sure how to proceed.

I appreciate if some can lead me in right direction,

Joseph

snibgo
Posts: 10022
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Convert any file type to .tiff while using highest quality settings.

Post by snibgo » 2017-11-28T15:26:00-07:00

For a single image:

Code: Select all

convert in.ext out.tiff
... where in.ext is a filename that exists.
snibgo's IM pages: im.snibgo.com

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

Re: Convert any file type to .tiff while using highest quality settings.

Post by fmw42 » 2017-11-28T15:54:32-07:00

Even if the filename has no .suffix, IM can usually figure it out from the header information.

Code: Select all

convert filename out.tiff

josephs
Posts: 36
Joined: 2014-04-08T10:13:43-07:00
Authentication code: 6789

Re: Convert any file type to .tiff while using highest quality settings.

Post by josephs » 2017-11-28T17:30:52-07:00

Thanks for the help! Without knowing the .suffix, I was able to successfully use:

convert in.* out.tiff

snibgo
Posts: 10022
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Convert any file type to .tiff while using highest quality settings.

Post by snibgo » 2017-11-28T17:42:38-07:00

josephs wrote:convert in.* out.tiff
This will take all the files in the current directory that match the pattern in.*, and make one file called out.tiff that contains multiple images. If your files have unique names before the dot, that won't be a problem.
snibgo's IM pages: im.snibgo.com

Post Reply