Method and apparatus for handling alpha premultiplication of image data

A method and apparatus for handling alpha premultiplication is described. In an embodiment, image data is contained within an instance of an image object that also contains a state variable indicating whether the image data is currently premultiplied or non-premultiplied. A method within the image o...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: GRAHAM, JAMES, EVANS, JERALD R, HUNG, JEANNETTE
Format: Patent
Sprache:eng
Schlagworte:
Online-Zugang:Volltext bestellen
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
Beschreibung
Zusammenfassung:A method and apparatus for handling alpha premultiplication is described. In an embodiment, image data is contained within an instance of an image object that also contains a state variable indicating whether the image data is currently premultiplied or non-premultiplied. A method within the image object responds to requests to coerce the image data into a desired or destination premultiplication state. Based on the value of the state variable, the method multiplies or divides the image data components by the alpha component, or does nothing. The state variable is updated to reflect any change in the premultiplication state of the image data. In one embodiment, the image object is implemented as a buffered image object instance containing a tile object instance and a color model object instance. The tile object instance maintains a reference to a data array(s) containing the image data file, and provides methods for inserting and extracting pixel data from the data array(s). The color model object instance contains the premultiplication state variable for the image data, and a method for coercing the image data into a desired premultiplication state. Applications can insure that image data is in the desired premultiplication state by accessing the associated buffered image object instance to invoke the coercion method, and specifying the desired state. The buffered image object instance responds by invoking the data coercion method in the color model object instance, and specifying the desired premultiplication state and the tile object instance containing the image data.