Page 1 of 1

Convert PSD to TIFF and apply clipping-path

Posted: 2011-01-19T03:21:04-07:00
by Luca
Hello again.

I try to convert a PSD file to TIFF and remove the background by using a cliping-path. This works fine with this command:

Code: Select all

convert source.psd -background white -fill white -draw "color 0 0 reset" 
-transparent white -clip -draw "Image Copy 0,0 0,0 source.psd" -strip out.tiff
But the cliping-path-informations are gone after the conversion.

I expected that this command:

Code: Select all

 identify -verbose source.psd -> out.tiff 
would apply the image-informations to the TIFF-file. Maybe I am wrong with that but I get a exception:

Code: Select all

Magick: no decode delegate for this image format 'C:/Users/Luca/AppData/Local/Temp/magick-0nt3IZnI' @ error/constitute.c/ReadImage/532
I realy need help with that.. could anybody give me a hint? Should I instal GohstScript? Is the conversion-command wrong? Where can I find help in the documentary?
Sorry for my bad english skills.

Code: Select all

DELEGATES bzlib freetype jpeg jp2 lcms png tiff x11 xml wmf zlib
FEATURES OpenMP
HOST Windows
LIB_VERSION 0x667
VERSION 6.6.7

Re: Convert PSD to TIFF and apply cliping-path

Posted: 2011-01-20T06:48:29-07:00
by Luca
Ok I found out, that -strip removes the clipping-path. So if I dont use -strip and convert a PSD to a PSD with the command (see above) I get the right result.
But I want to convert the PSD to a TIFF. And if I try that I get a file where the image has been clipped with white but not with transparency.
Still nobody how can help me please?

Re: Convert PSD to TIFF and apply clipping-path

Posted: 2011-01-20T11:54:27-07:00
by fmw42

Re: Convert PSD to TIFF and apply clipping-path

Posted: 2011-01-21T05:19:04-07:00
by Luca
Ok thank you.. this command also does it right:

Code: Select all

convert gmw.psd -profile "C:\Program Files\ImageMagick-6.6.7-Q16\config\sRGB.icm" -alpha transparent -clip -alpha opaque out.tiff
I finaly found out what the problem is:
TIFF-files use the alpha-channel for transparency. It depends on a program whether to use the aplha channel or not. QuarkExpress, Photoshop CS 5, Paint, Paint.net, Word and Microsoft Image-Preview are using it but Photoshop CS 4 and Irfan View are not. So if you open a transparent TIFF with Photoshop CS 4 you will still see the background.

There is still one undissolved mystery...
I convert a PSD to a PSD with the command seen above. The background is gone. Now I convert the result-PSD to a TIFF:

Code: Select all

convert out.psd out.tiff
And the background is back again. Where does this information come from? I cant find the background anywhere in the out.psd. I realy dont understand that.. but it does not matter.
Thank you.

Re: Convert PSD to TIFF and apply clipping-path

Posted: 2011-01-21T10:59:11-07:00
by fmw42
Tiff and PSD have both background transparency and alpha transparency. IM can only use one or the other and for the most part right now, IM is using the background transparency (and no ability to choose otherwise). This has been an ongoing discussion and an enhancement request. I think there may still be one case where IM uses the alpha left. But for the most part it has been made consistent so that the IM image looks like what one sees when opening PSD or TIFF with Photoshop -- that is the default display. There are still some bugs in converting PSD for grayscale images in IM as well. This is all from my own experience and not as a developer.

Re: Convert PSD to TIFF and apply clipping-path

Posted: 2011-01-23T17:22:30-07:00
by anthony
Luca wrote:Ok thank you.. this command also does it right:

Code: Select all

convert gmw.psd -profile "C:\Program Files\ImageMagick-6.6.7-Q16\config\sRGB.icm" -alpha transparent -clip -alpha opaque out.tiff
Niffy solution. Though only works if your original image was fully-opaque.

Have you tried...

Code: Select all

  convert image_clip.tif  -clip   image_masked.png