Page 1 of 2
Convert TIFF to PSD and keep transparency
Posted: 2016-01-28T01:49:15-07:00
by jansuhr
I have a workflow that receives TIFF-files now and then and I need to save them to PSD.
First I have tried to find TIFF-files with transparency by using this command:
Code: Select all
convert infile.tif -format %[opaque] info:
But this will give the answer true for both transparent and non-transparent files
Secondly I have tried to convert the TIFF-files to PSD and to keep the transparency if there is any.
I have searched this forum for clues on how to do this but none of them have worked.
The TIFF-files have a layer to be able to save them with transparency from PhotoShop but what ever I try they get a white background.
Thanks
Jan
Re: Convert TIFF to PSD and keep transparency
Posted: 2016-01-28T02:04:46-07:00
by snibgo
As far as I know, %[opaque] accurately says whether or not all the pixels are fully opaque. Perhaps you are talking about something else, where pixels are opaque but transparency is recorded in some other way.
Please provide a sample TIFF with the problem.
Re: Convert TIFF to PSD and keep transparency
Posted: 2016-01-28T02:16:12-07:00
by jansuhr
Re: Convert TIFF to PSD and keep transparency
Posted: 2016-01-28T02:47:36-07:00
by snibgo
The file contains two images. %opaque reports:
Code: Select all
f:\web\im>%IM%convert Tranparent-tif.tif -format "%[opaque]\n" info:
convert.exe: Incompatible type for "RichTIFFIPTC"; tag ignored. `TIFFFetchNormal
Tag' @ warning/tiff.c/TIFFWarnings/887.
true
false
So it reports the first as fully opaque ("true"), but the second has transparency ("false"). "identify -verbose" says the same thing. When I convert each to a PNG, and examine these with Gimp, the first PNG is opaque while the second has a large central transparent rectangle.
Is this not correct, somehow?
Re: Convert TIFF to PSD and keep transparency
Posted: 2016-01-28T03:11:59-07:00
by jansuhr
Well, it is saved from Photoshop as an TIFF with one layer and it has an central rectangle that is transparent. So that is correct.
That might also explain why I can not save it to a PSD with IM and keep the transparency.
Here is another one with a more obvious transparency.
https://dl.dropboxusercontent.com/u/687 ... parent.tif
Jan
Re: Convert TIFF to PSD and keep transparency
Posted: 2016-01-28T03:24:38-07:00
by snibgo
Again, IM reports that we have two images. The first is opaque; the second has a transparent background (transparent white) around the figure.
The second image also has a page offset.
What command do you use to save it to PSD? I don't have Photoshop so can't test, but this should work:
Code: Select all
convert "CJ Pettersson transparent.tif[1]" +repage cj.psd
+repage removes the page offset. It should make no difference to the transparency.
Re: Convert TIFF to PSD and keep transparency
Posted: 2016-01-28T03:33:16-07:00
by jansuhr
I get errors with that command:
Code: Select all
Jans-iMac:~ jannes$ convert "/Users/jannes/Desktop/CJ\ Pettersson\ transparent.tif[1]" /Users/jannes/Desktop/CJ\ Pettersson\ transparent2.psd
convert: unable to open image `/Users/jannes/Desktop/CJ\ Pettersson\ transparent.tif': No such file or directory @ error/blob.c/OpenBlob/2695.
convert: no images defined `/Users/jannes/Desktop/CJ Pettersson transparent2.psd' @ error/convert.c/ConvertImageCommand/3230.
So by [1] you select the layer that is transparent?
Jan
Re: Convert TIFF to PSD and keep transparency
Posted: 2016-01-28T03:42:05-07:00
by jansuhr
When I run the command I only get one answer back:
Code: Select all
Jans-iMac:~ jannes$ convert /Users/jannes/Desktop/CJ\ Pettersson\ transparent.tif -format "%[opaque]\n" info:
convert: Incompatible type for "RichTIFFIPTC"; tag ignored. `TIFFFetchNormalTag' @ warning/tiff.c/TIFFWarnings/856.
true
It only sees the first one
Jan
Re: Convert TIFF to PSD and keep transparency
Posted: 2016-01-28T03:47:52-07:00
by snibgo
You had a command with the error:
No such file or directory
Perhaps the backslash within the quotes is the problem there.
Only seeing the first image is strange. I am using IM v6.9.2-5, which is fairly recent. What version are you using?
EDIT:
jansuhr wrote:So by [1] you select the layer that is transparent?
Yes. There are two images. We get just the first with [0] or just the second with [1].
Re: Convert TIFF to PSD and keep transparency
Posted: 2016-01-28T03:58:14-07:00
by jansuhr
I tried to remove the spaces but got the same error.
I have IM 6.9.1-10
Try to update and see if it gets better.
Jan
Re: Convert TIFF to PSD and keep transparency
Posted: 2016-01-28T04:00:21-07:00
by jansuhr
I'm installing with HomeBrew on my Mac and it seems that the latest they provide is 6.9.1-10
Re: Convert TIFF to PSD and keep transparency
Posted: 2016-01-28T04:01:49-07:00
by snibgo
Try:
Code: Select all
identify "CJ Pettersson transparent.tif"
I get:
Code: Select all
CJ Pettersson transparent.tif[0] TIFF 1197x1277 1197x1277+0+0 8-bit sRGB 3.107MB 0.016u 0:00.015
CJ Pettersson transparent.tif[1] TIFF 1109x1149 1109x1149+58+128 8-bit sRGB 0.109u 0:00.116
identify.exe: Incompatible type for "RichTIFFIPTC"; tag ignored. `TIFFFetchNormalTag' @ warning/tiff.c/TIFFWarnings/887.
Re: Convert TIFF to PSD and keep transparency
Posted: 2016-01-28T04:20:23-07:00
by jansuhr
I only get one:
Code: Select all
Jans-iMac:~ jannes$ identify /Users/jannes/Desktop/CJPetterssontransparent.tif
/Users/jannes/Desktop/CJPetterssontransparent.tif TIFF 1197x1277 1197x1277+0+0 8-bit sRGB 3.107MB 0.000u 0:00.000
identify: Incompatible type for "RichTIFFIPTC"; tag ignored. `TIFFFetchNormalTag' @ warning/tiff.c/TIFFWarnings/856.
Re: Convert TIFF to PSD and keep transparency
Posted: 2016-01-28T04:35:06-07:00
by snibgo
Okay, your version of IM can see only one image. Mine can see two. Fred (fmw42) uses a Mac, so he may suggest how you can upgrade. He's in California, so currently asleep. And I have to go out. Back soon.
Re: Convert TIFF to PSD and keep transparency
Posted: 2016-01-28T04:40:26-07:00
by jansuhr
Thanks for you help so far.
If I do a identify on a PSD file, same file but as PSD it will show two images. But it is a PSD, totally different thing
Jan