Tiff resize removes alpha channel

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
theiviaxx
Posts: 11
Joined: 2012-09-11T15:26:23-07:00
Authentication code: 67789

Tiff resize removes alpha channel

Post by theiviaxx »

Hello, i'm trying to use IM to resize images as its has some better options than PS. However if I have an RGBA TIFF and a simple:

Code: Select all

convert.exe source.tif -resize 1024x1024 dest.tif
Will essentially "bake" the alpha channel as transparency into the tiff and remove the alpha channel. I've tried the different -alpha settings, but nothing did the trick.

Is there a way to preserve the alpha channel?

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

Re: Tiff resize removes alpha channel

Post by fmw42 »

Post a link to your tiff file. You can upload to say dropbox and put a link here to it.

If you do

identify -verbose source.tiff

does it show an alpha channel?

IM can only handle one or the other of background transparency and alpha channel. I do not recall which one it uses. So if you have the wrong one, you will lose the alpha channel when reading the image.

If IM sees the alpha channel, then try

convert source.tiff -alpha on -channel rgba -resize 1024x1024 dest.tif

My guess is that your tiff file has the wrong kind of transparency and IM does not see it.
Post Reply