Skip to content

Class BitmapRegionDecoder

Il Kadyrov edited this page Oct 28, 2020 · 2 revisions

BitmapRegionDecoder class is used for getting bitmaps from byte array.

Referenced from: ResourceManager.

Public methods

Function newInstance

public BitmapRegionDecoder newInstance(byte[] data, int length)

Function returns the instance of BitmapRegionDecoder, which could be used for decoding byte array to bitmap.

Parameters
  • data — byte array of compressed image data.
  • length — length of data byte array.
Return value

BitmapRegionDecoder class instance.

Function decodeRegion

public Bitmap decodeRegion(Rectangle rectangle, int sampleSize);

Function decodes a rectangle region in the image specified by rect.

Parameters
  • rectangle — byte array of image data.
  • sampleSize — if set to a value > 1, requests the decoder to subsample the original image, returning a smaller image to save memory.
Return value

Bitmap class instance.

Clone this wiki locally