I’m trying get bytes from bitmap in blackberry using the next method in Bitmap:
getRGB565(byte[] rgbData, int offset, int scanLength, int x, int y, int width, int height)
But i have read the params and i don’t know how must i calculate scanLength:
scanLength – Width of a scanline (in bytes) within the data array.
Any idea?
Here
scanLengthis the full width of the original image, whilewidthis the width of the rectangle you are copying from.If you are copying the whole image it is the same, but if you are copying only a part of the image you’ll have
scanLength > width.See also the Bitmap#getRGB565 javadoc