Some questions

Boudewijn Rempt boud at valdyas.org
Thu Mar 16 14:36:52 CET 2006


On Thursday 16 March 2006 14:29, Leonardo Giordani wrote:
> Hi all,
>
> I have some questions about Krita's code:
>
> 1) What are "factor" and "offset" in convolveColors()? For example in
> colorspaces/rgb_u8/kis_rgb_colorspace.cc

factor is a value that each summed color component is divided by while 
convolving; offset is added. So, we add all values for red, green and blue in 
a set of pixels, then divice them by factor and add offset. Factor should be 
near the sum of the kernel values in the convolution kernel otherwise the 
result will be much darker or lighter.

> 2) What is KisProfile?

A wrapper around an icc profile as represented in lcms. That is, it contains 
the data necessary to convert colors in a controlled way.

> 3) What is intensity8() supposed to do?

It returns the intensity of a color as an 8-bit value. For instance, for rgb:

return (Q_UINT8)((src[PIXEL_RED] * 0.30 + src[PIXEL_GREEN] * 0.59 + 
src[PIXEL_BLUE] * 0.11) + 0.5);

It's a kind of a grayscale representation of a color.

> I slowly begin to understand Krita...

Good!

-- 
Boudewijn Rempt 
http://www.valdyas.org/fading/index.cgi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kimageshop/attachments/20060316/1f793a10/attachment.pgp 


More information about the kimageshop mailing list