|
Hello NG,
I have a small image that
looks like a GUI button (with 3D effects given by different pixels colours). The
current image has as "basic" colour the grey. For "basic", I mean that the
predominant colour in the image is grey and some other pixels are brighter or
darker in order to give the 3D effect on that image.
Now my question: is it possible to transform the
pixels colours in order to have another basic colour (say blue)? In other words,
the predominant colour will become the blue, with other pixels in a brighter or
darker blue to give the same 3D effects.
Thanks a lot for every suggestion, and sorry if
it is a basic question. I just started to learn PIL.
Andrea.
P.S. I am trying also to use Numarray
(Numeric) in order to do this transformation. Someone suggested me to use the
function rgb_to_hsv on every pixel and then to change only the "hue" value, to
obtain another colour for every pixel, in order to obtain the same 3D effect.
I think I have found the way to do it, but doing
that for every pixel is quite slow... is there a way to do it more "globally" (I
mean on the whole image)? Or, as alternative, can I identify the pixels that
share the same colour and then apply the transformation on all
them?
Thanks a lot for all your
suggestions.
Andrea.
"Imagination Is The Only Weapon In The War Against
Reality."
http://xoomer.virgilio.it/infinity77 |
_______________________________________________ Image-SIG maillist - [email protected] http://mail.python.org/mailman/listinfo/image-sig
