How to deconstruct the ARGB values from the UINT returned by bitmapData.getPixel(x,y)

Jump to: navigation, search

Use bitwise and '&' and bitwise shift >> var srcPixel = bitmapData.getPixel(xpos, ypos); var b=srcPixel&255; var g=srcPixel>>8&255; var r=srcPixel>>16&255; var a=srcPixel>>24&255; Do not use the toString() on uint as this method always assumes signed integers.

See also

Use your Android as a Chamberlain garage door opener remote

Personal tools
Namespaces
Variants
Views
Actions
Navigation