Transparent PNG to transparent 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
axelrose
Posts: 96
Joined: 2008-12-16T06:01:27-07:00

Transparent PNG to transparent TIFF

Post by axelrose »

Hello,

I test some transparency option and look for optimizations.

If I use this PNG with alpha channel:

Image

and convert to TIFF with

Code: Select all

convert transp.png transp.tif
I'll get this result:

Image

which looks fine at first glance. When looking very carefully you could see some tiny
differences between the alpha channel of both images.

A minor annoyance is if I open in Photoshop CS4 the background is black rather
than transparent, see:

Image

How could I improve this?


Many thanks
Axel

IM is version 6.5.4-7
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Transparent PNG to transparent TIFF

Post by fmw42 »

I don't really see any differences between your two image.

I took your image and tried the same thing of converting to tif and displaying in PS CS8 and got the same result. It looks like PS does not recognize the transparency in TIFs. It works fine with your PNG. I also made a totally transparent tif and it was black. IM transparency is rgb=black and transparency=0. So if PS is ignoring the transparency, you will see just black or whatever is in your rgb channels.

I don't know if there is a bug in IM or not.

In PS, you have to check a special box to save transparency and it warns that many programs do not recognize transparent tifs. But I was able to save it and display it again with transparency in Mac PREVIEW and PS. So perhaps PS has a special way of saving transparency. Or perhaps IM is not setting that flag in the Tif file correctly.

I will leave the rest to the IM folks to comment or verify.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Transparent PNG to transparent TIFF

Post by magick »

ImgeMagick produces proper PNG and TIFF transparent images that follow the published standards. Adobe most likely expects transparent images to have certain characteristics otherwise it ignores the transparency channel. If you let us know what Adobe requires, we will let you know how to use the command line to produce an image that Adobe can process.
Post Reply