TiffSettings.IsAlphaPremultiplied Property

Gets or sets a value indicating whether to premultiply image with alpha channel during writing or not.

Namespace: Aurigma.GraphicsMill.Codecs
Assembly: Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)

Syntax

C#
public bool IsAlphaPremultiplied { get; set; }

Property Value

true if color channels of each pixel are premultiplied with corresponding alpha channel; otherwise, false. The default value is false.

Remarks

This property has meaning only when you save an image with alpha channel.

TIFF specification defines two ways of alpha channel storing.

  • Unassociated alpha. The content of the alpha channel is simply stored along with color channels of the image. This is default behaviour.
  • Associated alpha. The content of the alpha channel is stored into the file, but color channels of each pixel are premultiplied with the corresponding alpha channel value.

You should use TIFF files with associated alpha if you have software which gain some benefit from them (for example, unassociated alpha channel will be shown as separate channel in Adobe® Photoshop®, while image with associated alpha will be shown as image with transparency). But you should take into account that premultiplying process is slow and introduces rounding errors. So you should not set this property to true without reason.

There is no difference for you between files with "associated" and "unassociated" alpha if you process them with Graphics Mill. TiffReader class implementation takes into account this option during image reading and performs demultiplication if necessary. So you will always get usual Bitmap object with "unassociated" alpha.

See Also

Reference