Cannot convert tif with transparent background to gif

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
maxiong

Cannot convert tif with transparent background to gif

Post by maxiong »

I am using Image Magick to convert a tif file with a transparent background and a clipping path into a gif hoping that it would come out with a transparent background. however, it's not working and the background is coming out white. any ideas? when viewing the tif file, it clearly shows the background is transparent.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Cannot convert tif with transparent background to gif

Post by fmw42 »

I had the same problem on some TIF files from a client. see viewtopic.php?f=1&t=16629. The first one I reported (from my client) did not include the tiff tag (tiff:alpha: unassociated), which seems to be needed for IM to recognize background transparency. I created another test image on my old PS CS and it included that tag and so IM found and included the background transparency.

I don't know if the Photoshop tools have changed the way they report TIFF background transparency in newer version of PS.
Drarakel
Posts: 547
Joined: 2010-04-07T12:36:59-07:00
Authentication code: 8675308

Re: Cannot convert tif with transparent background to gif

Post by Drarakel »

@maxiong: Can you post a link to your file?

@Fred: I'll write a reply into the other thread.
maxiong

Re: Cannot convert tif with transparent background to gif

Post by maxiong »

I actually figured out what it was. It was the tif file itself. As fmw2 indicated, we just had to resave the tif file with the transparency turned on. It's a save option when you go and save the tif file in Adobe CS3. You just have to remember to check a box that says "Preserve Transparency". I appreciate everyone's help. Thanks so much.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Cannot convert tif with transparent background to gif

Post by fmw42 »

maxiong wrote:I actually figured out what it was. It was the tif file itself. As fmw2 indicated, we just had to resave the tif file with the transparency turned on. It's a save option when you go and save the tif file in Adobe CS3. You just have to remember to check a box that says "Preserve Transparency". I appreciate everyone's help. Thanks so much.

Yes, that was what I did when I created my test1.tif in PS CS. I saw that checkbox on save. The interesting thing is what happens if you don't check that. When you re-open the file in PS, does it still show transparency? When I do that in PS CS (don't check the transparency on the tif save window), then when I reopen it in PS, it still shows the transparent background. However, now IM does not see the transparency.
maxiong

Re: Cannot convert tif with transparent background to gif

Post by maxiong »

You are correct. If you save the tif file without that box checked, IM will not recognize that there's a transparent background although even if you open that up in PS, it'll still show the transparent background still being there.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Cannot convert tif with transparent background to gif

Post by fmw42 »

maxiong wrote:You are correct. If you save the tif file without that box checked, IM will not recognize that there's a transparent background although even if you open that up in PS, it'll still show the transparent background still being there.

Thanks for the confirmation.

Fred

P.S. This topic is very similar to mine at viewtopic.php?f=1&t=16629
Post Reply