Class NCBitmapRegionDecoder - Navigine/Indoor-Navigation-iOS-Mobile-SDK-2.0 GitHub Wiki

NCBitmapRegionDecoder class is used for getting UIImage from byte array.

Referenced from: NCResourceManager.

Public methods

Function newInstance

+ (nullable NCBitmapRegionDecoder *)newInstance:(nonnull NSData *)data
                                         length:(int32_t)length;

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

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

NCBitmapRegionDecoder class instance.

Function decodeRegion

- (nullable UIImage *)decodeRegion:(nonnull NCRectangle *)rect
                        sampleSize:(int32_t)sampleSize;

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

Parameters
  • rect — 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

UIImage class instance.