摘要 |
PROBLEM TO BE SOLVED: To relate a pre-multiplication state with other image data file formats by multiplying or dividing image data components by alpha components based on the value of a state variable. SOLUTION: A Coerce Data() method of a Color Model instance is called with a message which specifies a Tile instance and a desired pre-multiplication state (200). A response is made by accessing an isAlphaPremultiplied Boolean state (201). The state variable value is compared with the desired pre- multiplication state specified by the calling (202) and when they do not match each other, pixel values are read out of image data (203). Then a decision regarding correction needed to adapt the data to the desired pre-multiplication state is made (204) and according to whether the desired state is true or false, the constituent elements are multiplied or divided by alpha (205, 206). |