Re: Re: associated alpha

Bob Friesenhahn <[email protected]> Sat, 5 Feb 2005 11:57:35 -0600 (CST)
Newsgroups gmane.comp.video.graphicsmagick.core
Message-ID <[email protected]>
On Sat, 5 Feb 2005, Glenn Randers-Pehrson wrote:

> At 10:06 AM 2/5/2005 -0600, Bob Friesenhahn wrote:
>> Unfortunately, all TIFF images written by ImageMagick and
>> GraphicsMagick over past years are mis-marked to contain associated
>> alpha so they would be loaded incorrectly.
>
> In that case it would be useful to have an option to re-mark them:
>
>   display -unassociated_alpha mismarked.tiff
>
>   convert -unassociated_alpha mismarked.tiff corrected.tiff
>
> If the input is already marked "unassociated alpha" or is not
> a tiff file, the -unassociated_alpha option would do nothing.
> Or what?

That is a good point.  It would be easy enough to supply the option:

   -define tiff:alpha={associated|unassociated|undefined}

so that the user can specifically mark/indicate the type of alpha in 
the file.  This would be supported for both reading and writing. 
TIFF files with wrong/lacking alpha channel descriptions abound.

Presumably this would then work

   gm convert -define tiff:alpha=unassociated old.tiff \
              -define tiff:alpha=associated new.tiff

Bob
======================================
Bob Friesenhahn
[email protected]
http://www.simplesystems.org/users/bfriesen


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl