Hi,

I'm wondering how to do RGB <-> HSV conversion in numpy. I found a
couple solutions through stackoverflow, but somehow they can't be used
in my array format. I understand the concept of conversion, but I'm
not that familiar with numpy.

My source buffer format is 'RGBA' sequence. I can take it into numpy
via: numpy.fromstring(data, 'B').astype('I'). So that nd[0::4] becomes
the array for the red channel. After color manipulation, I'll convert
it back by nd.astype('B').tostring().

How do I run RGB <-> HSV conversion on the nd array? I'd like to keep
SV values in the range of 0-1, and H in 0-360. Thank you.

-- 
Best regards,
He Shiming
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to