On Tue, 11 Dec 2012, Sebastien Leon wrote:

>
> In my graphic pipeline, it appears that the image that I would like to
> process are in premultiplied RGBA, which is much faster to blend that
> regular RGBA.
> LittleCMS, for now, left unchanged the alpha channel and does not care
> about it.
> Obviously, any premultiplied R/G/B (or any other kind of channel) will
> not be handled correctly if there is no specific code in LittleCMS core.
>
> As a turn-around, it is always possible to turn the premultiplied
> feature off or to convert to regular RGBA before/after the call to
> cmsDoTransform. But the performances are damn impacted.
> The other point to consider is the potential benefit to take care of
> Alpha : if (alpha == 0), there is no need to process this pixel, as the
> point is fully transparent. (btw, this optimization could already be
> enable for regular RGBA)

I don't see how lcms could possibly properly deal with premultiplied 
alpha.  In this case, the color channels are (permanently) influenced 
by a non-color channel, and the final result is usually based on a 
composition on some other image/color (default black).

It would be wrong to assume a particular meaning for Alpha beyond its 
definition in some particular file format (e.g. TIFF).

The software I maintain uses inverted alpha internally so zero is 
fully opaque.

IMHO premultiplied alpha is an interesting idea (codified in the TIFF 
file format) which ultimately causes more harm than benefits.  It was 
proposed in a time when CPUs were vastly less powerful than today. 
Note that the PNG file format (which makes more use of alpha than 
perhaps any other format) does not use premultiplied alpha.

Bob
-- 
Bob Friesenhahn
bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Lcms-user mailing list
Lcms-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lcms-user

Reply via email to