Re: precomputing alpha + color accuracy ?
Re: precomputing alpha + color accuracy ?
- Subject: Re: precomputing alpha + color accuracy ?
- From: Raphael Sebbe <email@hidden>
- Date: Fri, 4 Jan 2002 09:38:59 +0100
On Thursday, January 3, 2002, at 10:39 PM, Andrew Platzer wrote:
As for high quality output, premultiplying does not affect the output.
Given source bitmap pixel s and destination pixel d, a blend is
basically
d' = c * s + (1 - a) * d
All premultiplication does is precalculate c * s. What it does mean is
if you want manipulate the actual data (e.g. like Photoshop), you
shouldn't use NSBitmapImageRep for storage.
Actually, I need both. Show the transparent image to the user
(NSBitmapImageRep+NSImage, premultiplication is fine), and let him save
it so that he can use (or not) the alpha component in photoshop or other
(in this case I don't want pre-multiplication).
It'd be great to have such a flag -[NSBitmapImageRep
setPremultiplies:(BOOL)], so that NSBitmapImageRep could be used both
for storage and drawing (with an overhead if YES).
Thanks,
Raphael