[ptx] nona, gimp-2, TIFF_mask multilater tiff files

Pablo d'Angelo pablo at mathematik.uni-ulm.de
Wed Jan 7 17:37:38 GMT 2004


On Wed, 07 Jan 2004, Bruno Postle wrote:

> On Wed 07-Jan-2004 at 09:22:21AM -0700, JD Smith wrote:
> > 
> > Can you not just say: Add Layer Mask... -> Layer's Alpha Channel and
> > recover a fully-functioning mask?  Probably a plug-in which does this
> > for all layers would be easy.
> 
> I can adjust the alpha-channel and make it completely opaque, all it
> does is reveal that the underlying pixels are 0,0,0 black.  The
> process of merging the masks into an alpha-channel has removed the
> RGB information where the masks indicated full transparency.

Thats probably a bug in the tiff loader. the same that forces tif2xcf to use
a masked and an unmasked tif image.

The tiff spec says (p. 77) defines 2 types of extra channels, for rgb images
channel 4,5,... are all challed extra channels and should contain alpha
values (not sure how multiple extra channels should be handled).

These extra channels can be saved in two ways, depending on the
"ExtraSamples" tag in the tiff spec:

0: unspecified data
1: associated alpha data (RGB channels are premultiplied with the alpha data
  -> masked areas are permanently lost. Probably useful for tif loader that
     cannot deal with alpha, but IMHO, quite stupid in general).
2: unassociated alpha data, alpha is not merged with the RGB channels.
   nona saves the alpha channel as extra unassociated alpha channel

The tiff plugin provided by Kai-Uwe is the one used by cinepaint and should
work correctly with 2). Unfortunately it was not accepted into gimp because
of adding a chunk of untested code seemed to be a high risk, at such a time
before the gimp 2 release, Kai-Uwe told me.

I'm downloading gimp-2.0pre1.tar.bz2 at the moment, to see what the tiff
loader there does. 

ciao
  Pablo
--
http://wurm.wohnheim.uni-ulm.de/~redman/
Please use PGP


More information about the ptX mailing list