translate photoshop tiff save options

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
Nik
Posts: 37
Joined: 2009-09-16T03:54:58-07:00
Authentication code: 8675309

translate photoshop tiff save options

Post by Nik »

Hi all, could any point me in the right direction of how to apply similar settings to an image that are available when saving a tiff in Photoshop.

Embed Colour Profile: true
Image Compression: LZM
Pixel Order: Interleaved
Byte Order: Macintosh
Save Image Pyramid: true

I've read a few things about ptif but I don't pretend to understand it. I also think that I need to specify the LZW compression last from what I've read:

convert input.tif -compress lzw output.tif

Any help would be great.

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

Re: translate photoshop tiff save options

Post by fmw42 »

see the TIF section of http://www.imagemagick.org/script/formats.php for the -define options

Code: Select all

convert image.tif -define ... -define ... etc ... PTIF:result.tif

If you need to add a profile and there is not one in the input, you can see http://www.imagemagick.org/Usage/formats/#profiles for the -profile command. If your input has a profile, then it will likely pass to the output.
Nik
Posts: 37
Joined: 2009-09-16T03:54:58-07:00
Authentication code: 8675309

Re: translate photoshop tiff save options

Post by Nik »

Hi Fred,

many thanks for your reply. I wander if you could explain about the Pyramid tiff format. It's my understanding that it creates multiple, smaller versions of the main image file that are saved in the tiff and used for viewing on the web? In Photoshop you simply tick the 'Save Image Pyramid' option, does:

Code: Select all

PTIF:output.tif
do the same thing?

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

Re: translate photoshop tiff save options

Post by fmw42 »

PTIF: will create a pyramid tiff with different size/resolution levels and tiled to the specification of the appropriate -define. I believe there is only a fixed number of resolution levels create, but do not recall the exact number, it may be 6 levels or it may depend upon how big your tiff file is in dimensions. You will have to create one and see from identify what it tells you.

You will have to check from the libtiff web page what version of libtiff is required and be sure that you are using that in IM.

On unix systems, you can type in a terminal

tiffinfo

and get the version number

Here is an example: see http://en.wikipedia.org/wiki/File:Barns ... tetons.jpg

Code: Select all

convert barns_grand_tetons.jpg PTIF:barns_grand_tetons_ptif.tif

identify barns_grand_tetons_ptif.tif
barns_grand_tetons_ptif.tif[0] TIFF 1600x1195 1600x1195+0+0 8-bit sRGB 7.78MB 0.000u 0:00.000
barns_grand_tetons_ptif.tif[1] TIFF 800x597 800x597+0+0 8-bit sRGB 7.78MB 0.000u 0:00.000
barns_grand_tetons_ptif.tif[2] TIFF 400x298 400x298+0+0 8-bit sRGB 7.78MB 0.000u 0:00.000
barns_grand_tetons_ptif.tif[3] TIFF 200x149 200x149+0+0 8-bit sRGB 7.78MB 0.000u 0:00.000
barns_grand_tetons_ptif.tif[4] TIFF 100x74 100x74+0+0 8-bit sRGB 7.78MB 0.000u 0:00.000
barns_grand_tetons_ptif.tif[5] TIFF 50x37 50x37+0+0 8-bit sRGB 7.78MB 0.000u 0:00.000
Since I did not specify a -define for the tilesize, I think it defaults to 128

To specify it uniquely, you would use

Code: Select all

convert barns_grand_tetons.jpg -define tiff:tile-geometry=128x128 PTIF:barns_grand_tetons_ptif2.tif
Unfortunately, identify -verbose, does not seem to report the tiff tile size.

Anything further, you would need to check the ptif/tif specifications, which I am sure you can find on the web.
Nik
Posts: 37
Joined: 2009-09-16T03:54:58-07:00
Authentication code: 8675309

Re: translate photoshop tiff save options

Post by Nik »

Many Thanks Fred.

I must admit it was the -define tiff:tile-geometry=128x128 part that was confusing me the most. I wasn't sure if I needed to specify that part and if so what the correct syntax was.

I'll see what other info I can find about the ptiff format.

Thanks,
Nik
Post Reply