I'm looking for an efficient C or C++ algorithm that can convert RGB to HSV and vice versa. Thanks
+5
A:
This link has the conversion algorithm, as well as example code in C++
http://en.literateprograms.org/RGB_to_HSV_color_space_conversion_%28C%29
Neil N
2010-06-10 20:41:26
What about HSV to RGB?
Milo
2010-06-10 20:43:11
HSV to RGB should be the same algorithm, in reverse ;)
Neil N
2010-06-10 20:57:27
+1
A:
I implemented it using formulas from wikipedia http://en.wikipedia.org/wiki/HSL_and_HSV
lmmilewski
2010-06-10 20:44:08
+1
A:
This link has formulas for what you want. Then it's a matter of performance (numerical techniques) if you want it fast.
John at CashCommons
2010-06-10 20:44:38