.
My web app will be outputting color codes to my vb.net app.
In the web app, i have ColorR, ColorG, ColorB. each ranging from 0 to 254.
To save bandwidth, i intend to convert these three numbers into a single number.
and then, once my VB app receives it, convert it back to RGB.
I've been using the magic google, but i can't find anything to explain how to do it both ways.
for example, i found this:
but it doesn't explain how to convert the rgb to the integer.
any help would be appreciated.
(won't be using alpha)
My web app will be outputting color codes to my vb.net app.
In the web app, i have ColorR, ColorG, ColorB. each ranging from 0 to 254.
To save bandwidth, i intend to convert these three numbers into a single number.
and then, once my VB app receives it, convert it back to RGB.
I've been using the magic google, but i can't find anything to explain how to do it both ways.
for example, i found this:
Code:
dim i as integer = 6421504
dim c as color
c = System.Drawing.Color.FromArgb(i)
Probably the Alpha channel is missing, so you'd have to use
c = System.Drawing.Color.FromArgb(i or &Hff000000)any help would be appreciated.
(won't be using alpha)