since there is no build-in feature for that, you have to do this manually with an own sub. You can use something like this:
Code:
Sub Globals red = 0 green = 0 black = 0 End Sub
Sub App_Start ... Color2RGB(bitmap1.GetPixel1(w,h)) ... End Sub
Sub Color2RGB(color) colorNum = color + 16777216 red = Int(colorNum / 65536) green = Int((colorNum - red * 65536) / 256) black = colorNum - red * 65536 - green * 256 End Sub
Just a minor rectification...
It's Red, Green, Blue (not Black)
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France-Saumur
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate) B4PPC DLL Version Listing - B4Android DLL Version Listing
This calls the Clor2RGB sub passing the pixel(x,y) color value
Quote:
Sub Color2RGB(color)
colorNum = color + 16777216
red = Int(colorNum / 65536)
green = Int((colorNum - red * 65536) / 256)
black = colorNum - red * 65536 - green * 256
End Sub[/code]
Color2RGB takes the color value obtained from the pixel and converts it to an RGB value....
In the desktop, RGB has an extra value (chanel) Alpha (opacity), so it becomes ARGB... The 16777216 I'm gessing is to workaround this issue, asuming the full opacity value...
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France-Saumur
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate) B4PPC DLL Version Listing - B4Android DLL Version Listing
-3749946 gives R=198, G=199, B=198, which could be a correct approximation for R=192, G=192, B=192 as your device probably only supports something like 64K colours rather than the full 8bits on each colour.