|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Remember me mentioning the color matrix feature of GDI+
Experimenting and playing with the feature has given me some really good
insight.
http://www.pfk.ff.vu.lt/cie/1931CIE_explanation.htm
Talks about conversion to the CIE XYZ colorspace. The numbers in the
matrix were strange and mysterious to me. (Not only that, but uhg to do
the conversion I have to use matrix arithmetic. I used to hate doing
matrix multiplication simply because I'd get confused. I know, I know.)
anyway ... onward.
Those mystery numbers are actually the values that determine the make up
of the resulting channels so, in the example of XYZ -> RGB R is actually
made up of 0.412453 X, 0.357580 Y, 0.180423 Z ... its actually really
simple!
You can also do weird things with color matricies such as rotate the
colors along an axis, etc ... much as you can do with points. You can
also, of course use these matricies to convert a color from one RGB
profile to another (i.e. from sGRB to AdobeRGB) I'm considering taking a
close look at rotation to see what I can do, I'm thinking along the
right axis you can do hue and saturation shifts. :D
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Mike Raiford wrote:
> of the resulting channels so, in the example of XYZ -> RGB R is actually
> made up of 0.412453 X, 0.357580 Y, 0.180423 Z ... its actually really
> simple!
Oops, and it's even easier to get backwards.
Convert RGB -> XYZ ... X is actually made up of 0.412453 R, 0.357580 G,
0.180423 B
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> Those mystery numbers are actually the values that determine the make up
> of the resulting channels so, in the example of XYZ -> RGB R is actually
> made up of 0.412453 X, 0.357580 Y, 0.180423 Z ... its actually really
> simple!
Yep, that's all matrix multiplication is, just a compact way of writing out
those 3 equations of 3 variables :-)
BTW, the mappings that you can do by a matrix only convert to/from *linear*
RGB. When you show them on a display you need to gamma correct them (or if
you get a bitmap from somewhere, you need to undo the gamma first before
conversion).
> I'm thinking along the right axis you can do hue and saturation shifts. :D
Yup, look at the xy chromaticity diagram on that link, it should be easy to
see geometrically what you need to do in order to get those shifts.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
scott wrote:
>> Those mystery numbers are actually the values that determine the make
>> up of the resulting channels so, in the example of XYZ -> RGB R is
>> actually made up of 0.412453 X, 0.357580 Y, 0.180423 Z ... its
>> actually really simple!
>
> Yep, that's all matrix multiplication is, just a compact way of writing
> out those 3 equations of 3 variables :-)
>
> BTW, the mappings that you can do by a matrix only convert to/from
> *linear* RGB. When you show them on a display you need to gamma correct
> them (or if you get a bitmap from somewhere, you need to undo the gamma
> first before conversion).
And components in some schemes can't be derived as a linear combination
of values from another scheme. Hue, for instance. A line parallel to
the H axis in an HSV color scheme does not map to a straight line in RGB.
Regards,
John
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
John VanSickle wrote:
> And components in some schemes can't be derived as a linear combination
> of values from another scheme. Hue, for instance. A line parallel to
> the H axis in an HSV color scheme does not map to a straight line in RGB.
Damn you and your nonlinear colourspace transformations! What about
Dibble and Grubb?
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|