Can't get convert to maintain transparency of tiff

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
HayoBaan
Posts: 2
Joined: 2015-05-12T02:22:27-07:00
Authentication code: 6789

Can't get convert to maintain transparency of tiff

Post by HayoBaan »

Hi guys, hope you can help me out here. I'm trying to convert tiff files to png while still maintaining the transparency. Somehow I can't get it to work :(

Though I don't think it should be required, I have tried -alpha on, -alpha set, -background none, -channel rgba, but to no avail. When trying e.g., -transparent white, I get some transparency, but not as defined in the tiff files.
The tiff files in question are small 21x21 icons, created with Photoshop.

What am I doing wrong?

I'm running version ImageMagick 6.9.1-0 on Mac OS X Yosemite 10.3.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Can't get convert to maintain transparency of tiff

Post by snibgo »

Photoshop has (I am told) different types of transparency. Perhaps IM can't see that one. Try:

Code: Select all

identify -verbose x.tiff
Does this show an alpha channel?
snibgo's IM pages: im.snibgo.com
HayoBaan
Posts: 2
Joined: 2015-05-12T02:22:27-07:00
Authentication code: 6789

Re: Can't get convert to maintain transparency of tiff

Post by HayoBaan »

Right, this tells me: tiff:alpha: unspecified so I guess you're right, ImageMagick does not see the transparency...

I did some more digging and finally found the problem: the tiffs were saved without the 'Save Transparency' option. Re-saving with that option set, fixed the issue.

Your answer did help me find the cause, so many thanks!
Post Reply