Flatten Tiff, but preserve 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
mambo4
Posts: 12
Joined: 2013-08-21T15:03:42-07:00
Authentication code: 6789

Flatten Tiff, but preserve alpha channel

Post by mambo4 »

I want to flatten a layered tiff while retaining the alpha channel.

using this:
convert ../source.tif -alpha on -layers flatten -filter lanczos -resize 1024x1024 -unsharp 1x0.5 %temp%/temp.tga

I lose my alpha channel, what should be transparent turns opaque white.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Flatten Tiff, but preserve alpha channel

Post by fmw42 »

post a link to your input image. (up load to some free server such as dropbox and put link here).

Generally the alpha channel will be lost whenever you do a flatten. You may need to separate the alpha channel, process your file and the alpha channel and then add the alpha channel back.

Does your tiff file show a true alpha channel when you do

identify -verbose yourimage

Please always provide your version of IM and platform.
Post Reply