#HSI to RGB to HSI
8 messages in this thread
Which issue of AC has the info about HSI <–> RGB conversion? I, too, am
looking for something like that.
– Steve –
Hmmm… I wish I knew!!! You see I jus t had the program that cam with it.
The problem I found is that the program shows how to do HSI -> RGB but NOT HSV
-> RGB which is what most programs use. Don't worry, I've written one that
does! Also I'm just finishing the RGB -> HSV! It will hopefully be ready in 3
– 4 days (my girlfriend is just finishing some touches on the formula!) then
I'll clean the code up and post it for those that need it. Don't forget
though, I use Modula-2 and LongIntes.
Great! I remember using Deluxe Paint to ceck out if my math was being done
correctly. Does yours match up with DPaint?
He he! I guess we work alike! I checked with DPaintIII and with Pixmate since
Pixmate doesn't do immediate conversion but rather toggle. Just in case it
affected it in the end. Even though I'm using integers it doesn't seem to have
any serious deterioration on the final output. Although I wouldn't recommend
it for a palette of 256 possible combinations or more.
Modula-2 is fine by me, Robert. I've written many Modula-2 articles for AC in
the past. Waiting to see your code …
– Steve –
Hmm… Steve, I'm sorry to dissappoint you but I have some MAJOR problems.
Although it is possible and simple enough to get HSV to RGB, RGB to HSV seems
to be a tad TOO difficult. Saturation and Value go correctly enough, but hue
needs more accuracy than I can possibly achieve view an integer. I'll give it
one more try tomorrow, and if not I'll upload it as is for you. In anycase I'll
rewrite it using REALs since I really feel that having HSV is worth the extra
bits of the Real libraries.
That issue would be Volume 1 issue 5. (I wrote that article). It's in
AmigaBasic (the only language I had at the time), but it should be pretty easy
to follow.
Steve
Thanks for the info, Steve.
– Steve –