Page 1 of 1

Having trouble converting to a profile with a tiff file

Posted: 2013-02-06T11:08:20-07:00
by kareed
Hi,
I am having trouble with converting to a profile with a tiff file. By the way the tiff file was saved out of photoshop and it has layers. I am using the following command.

Code: Select all

convert -profile someprofile.icc input.tif output.tif
This runs fine. The problem I am having is when I open the converted file in photoshop it has the new profile attached but the image hasn't been converted. I am not an expert in the tiff format but my understanding is that when a layered file is saved out of photoshop as a tiff it saves a flattened version of the file in the expected tiff format but it also saves something like a psd file in one of the tags. It is my belief that the convert is only effecting the flattened tiff portion of the file but not the layed photoshop file.

Going with this idea I found a program that would strip a tiff tag out. I found that the tag 34377 was one that photo uses to store information. I then stripped the tag out of the converted file and reopened it in photoshop. It did indeed strip out all of the layers but this time it showed the correct color for the file with the correct profile attached.

My question is this, how can I cause the image located in the tag 34377 to be converted when I do a convert as well as the flattened image in the tif file or how can I strip this tag from the output file with imagemagick so that when it is opened up in photoshop it appears correct.

Thanks

Re: Having trouble converting to a profile with a tiff file

Posted: 2013-02-06T11:42:26-07:00
by snibgo
Your command should be:

Code: Select all

convert input.tif -profile someprofile.icc output.tif
I don't know Photoshop, but if you are saving a layered file into tiff, I would expect that it would make a multi-image tiff file. Yet you seem to imply there is only one image, perhaps with other images tucked away in tags. Posting an example would help.

Exiftool is good for examining, editing and removing tags.

Re: Having trouble converting to a profile with a tiff file

Posted: 2013-02-06T12:11:15-07:00
by kareed
Thanks for the reply. I tried reordering the convert and I get the same results.

The reason I believe the main tiff image isn't layered is because we have older tiff reading software that doesn't support that feature and they reaad just fine. I also know that adobe owns the rights to the specifications of the tiff format and they have their own private tags. This is why I believe it is storing something like a psd file in it when save as layers. This is the portion I think photoshop is reading when it open the photoshop layered file. So the image embedded in here isn't getting changed with the conversion.

I don't know what the exittool is. I will look into it.

I was hoping that I could accomplish what I want through just one program through command line. Basically attaching profiles to images that don't have them and and for images that do, I want to convert images to a different profile.

Re: Having trouble converting to a profile with a tiff file

Posted: 2013-02-06T21:59:20-07:00
by snibgo
Can you post an example tiff file? Put it on one of the free sites and put the URL here.

An image in a tiff file isn't layered. Each image may be one layer, or it may be all of the layers flattened together.

What happens when you type "identify x.tiff"? Does that show one image, or more? With the "-verbose" option, which images already have a profile?

Yes, Photoshop uses private tags. Apart from that, and spot colours, ImageMagick is good at applying profiles. It isn't so useful for manipulating metadata. For exiftool, see http://www.sno.phy.queensu.ca/~phil/exi ... stall.html

Re: Having trouble converting to a profile with a tiff file

Posted: 2013-02-07T10:19:59-07:00
by kareed
Hi,
I have put a sample tiff here http://www.premieraerials.com/temp/sample.tif

The verbose option seems to indicate only one layer. In photoshop there is the main layer and two text layers.

The image currently has Adobe 1998 as the profile. It is important to note that when the conversion to another profile is done, I believe the flattened tiff image is converted properly. If you open the converted file in photoshop it will show the document with the layers using the new profile but the image isn't showing up correctly. This leads me to believe that there is another background image that photoshop is actually using that hasn't been converted.

I went a head and started playing around with Exiftool and found I can remove the photoshop information by typing

Code: Select all

exiftool -ImageSourceData=  sample.tif
When I open the new file, the layers are gone and the image shows up properly.

Re: Having trouble converting to a profile with a tiff file

Posted: 2013-02-07T10:56:05-07:00
by snibgo
Good stuff. An ImageMagick option that be be useful to you is "-strip" that removes metadata, including (for this sample) all Photoshop metadata.

Re: Having trouble converting to a profile with a tiff file

Posted: 2013-02-07T12:25:57-07:00
by kareed
I did run across this but I wasn't sure I wanted to strip all the metadata from the file. Seemed a bit extreme.