A
Andrew Arace
Took me a while to come up with this (even though it looks simple) it
will convert a BGR color int (or long) like used in VB to a java Color
(java.awt.Color)
examples of this are:
colornum = 16777215; //pure white
colornum = 255; //pure red
colornum = 65280; //pure green
colornum = 16711680; //pure blue
public Color BGRColorToJavaColor(int BGRColorNumber) {
//color codes as a ing in form "BGR"
return new Color((float)(BGRColorNumber & 0xFF),
(float)((BGRColorNumber >> 8) & 0xFF),
(float)((BGRColorNumber >> 16) & 0xFF));
}
Just putting this here to help people. my google groups search didn't
come up with anything like it, so i'm just trying to change that.
comments to my email please
-Drew
will convert a BGR color int (or long) like used in VB to a java Color
(java.awt.Color)
examples of this are:
colornum = 16777215; //pure white
colornum = 255; //pure red
colornum = 65280; //pure green
colornum = 16711680; //pure blue
public Color BGRColorToJavaColor(int BGRColorNumber) {
//color codes as a ing in form "BGR"
return new Color((float)(BGRColorNumber & 0xFF),
(float)((BGRColorNumber >> 8) & 0xFF),
(float)((BGRColorNumber >> 16) & 0xFF));
}
Just putting this here to help people. my google groups search didn't
come up with anything like it, so i'm just trying to change that.
comments to my email please
-Drew