On Friday 26 August 2005 15:21, Marti wrote:
> On Thursday 25 August 2005 13:03, Boudewijn Rempt wrote:
> > Is it possible to have lcms copy the alpha channel values when doing a
> > transform? Or should that happen automatically?
>
> Sorry, no. lcms does *ignore* the alpha channel(s) either on input and
> output. That is because lcms supports more than 1 alpha channel, and then
> how tho map them in this case would be uncertain.
>
> In the other hand you can use the same buffer if the bps, channels and
> planar organization is same. For example, if you have a "Buffer" holding
> ABGR data, then you can do:
>
> cmsDoTransform(xform, Buffer, Buffer, npixels)
>
> Since lcms ignores alpha channels, this is going to work,  and also solves
> the multiple alpha case.

It's been a while, but we're now at a stage with Krita where having to loop by 
hand through all pixels to copy the alpha channel is getting rather 
prohibitively expensive :-(. When the display profile or colorspace isn't the 
same as the image profile we spend about half our cycles in cmsDoTransform, 
and about 30% in the alpha copy loop when loading an image and simply 
displaying it.

-- 
Boudewijn Rempt 
http://www.valdyas.org/fading/index.cgi

Attachment: pgpbXkHiPx80L.pgp
Description: PGP signature

Reply via email to