Page 1 of 1
no alpha channel after resizing of a tiff file
Posted: 2012-07-23T09:39:22-07:00
by _DK_
Hi,
I have a tiff file in phososhop with 4 channels (RGBA), once it's converted all the channels are mixed and I can only see 3 channels (RGB and A is gone).
I tried different options and even the one that is supposed to force alpha still doesn't work:
imagemagick\6.6.7-Q16\convert.exe test-alpha.tif -resize 512x512 -type TrueColorMatte -alpha On alpha-512.tif
Could you please give any hints? thanks!
Re: no alpha channel after resizing of a tiff file
Posted: 2012-07-23T12:04:30-07:00
by fmw42
try
convert.exe test-alpha.tif -resize 512x512 alpha-512.tif
convert.exe test-alpha.tif -resize 512x512 -type TrueColorMatte alpha-512.tif
I don't believe you need -alpha on and if you did, it probably should be right after the input image. Also you don't need -type in this case if the input is 32-bits and not 8-bits with transparency
If you post a link to your image, others can test as it may be a problem with your input tif. It might also be a bug in your IM version, which is a bit old.
On IM 6.7.8.6 Q16 Mac OSX Snow Leopard, I don't have any problem.
# create large transparent tif
convert logo: -resize 200% -transparent white logo200.tif
# process it
convert logo200.tif -resize 512x512 logo200_tmp1.tif
or
convert logo200.tif -resize 512x512 -type truecolormatte logo200_tmp2.tif
Both results show an alpha channel for the output.
Re: no alpha channel after resizing of a tiff file
Posted: 2012-07-24T11:48:31-07:00
by _DK_
Ok, tried the latest version:
ImageMagick-6.7.8-6\convert.exe test-alpha.tif -resize 128x128 alpha-128.tif
And am getting: convert.exe: Incompatible type for "RichTIFFIPTC"; tag ignored. `TIFFFetchNormalTag' @ warning/tiff.c/TIFFWarnings/820.
alpha-128.tif is still showing 3 channels only in photoshop. test-alpha was created in photoshop too (I assume it must have written the correct header).
Here're the files:
http://narod.ru/disk/57731551001.6bb800 ... k.zip.html (sorry about this site, if you point me to any free file hosting - I'd reupload there)
Re: no alpha channel after resizing of a tiff file
Posted: 2012-07-24T17:43:49-07:00
by fmw42
I tested your image and command and the output does have an alpha channel that shows in both IM and Photoshop CS for me. The warning you get is only a warning and not an error. Some tiff tag is there that IM does not understand and just skips with a warning.
I am using IM 6.7.8.6 Q16 Mac OSX Snow Leopard
You might try again by adding -strip to the command and see if that changes anything. Otherwise, it could be an IM bug only on Windows.
It could also be the version of libtiff you are using. I am using LIBTIFF, Version 3.9.5
You might be able to see what version you have by typing
convert -list format
and look at the line for TIFF
Re: no alpha channel after resizing of a tiff file
Posted: 2012-07-25T03:47:39-07:00
by _DK_
Thanks for replying again. I tried the "strip" option and nothing changed.
Have a look here:
http://oi47.tinypic.com/2igyxkp.jpg
It does show in the header it's a 32 bit image but for some reason alpha channel is gone (i.e. can't use it for other purposes)
Re: no alpha channel after resizing of a tiff file
Posted: 2012-07-25T10:20:14-07:00
by fmw42
Sorry, all I can say is that when I tried it on my Mac in IM 6.7.8.6 Q16, the alpha channel was in the output image as seen in PS CS. Sorry I only have that old version.
Perhaps some other windows user with PS can test your command and image.
Re: no alpha channel after resizing of a tiff file
Posted: 2012-10-10T09:00:00-07:00
by tafkaks
Just to add in a "me too", I'm suffering the same issue with photoshop and tiff's written out via IM. Details here:
viewtopic.php?f=3&t=22037
Re: no alpha channel after resizing of a tiff file
Posted: 2012-10-10T09:22:04-07:00
by fmw42
You may need to upgrade your IM as per Magick's reply that it works for him on 6.7.9.10
Re: no alpha channel after resizing of a tiff file
Posted: 2013-02-06T13:50:04-07:00
by NeoVitru
You can use -quite to suppress the warning msg - fmw42 suggested
Re: no alpha channel after resizing of a tiff file
Posted: 2013-02-06T15:59:07-07:00
by fmw42
NeoVitru wrote:You can use -quite to suppress the warning msg - fmw42 suggested
That would be -quiet rather than -quite. I suspect just a typo from NeoVitru.
See
http://www.imagemagick.org/Usage/basics/#controls