GPKGImageConverter
Objective-C
@interface GPKGImageConverter : NSObject
Swift
class GPKGImageConverter : NSObject
Conversions between images and image byte data
-
Decode the byte data to an image
Declaration
Objective-C
+ (id)toImage:(NSData *)data;Swift
class func toImage(_ data: Data!) -> Any!Parameters
databyte data
Return Value
image
-
Decode the byte data to an image with scale
Declaration
Objective-C
+ (id)toImage:(NSData *)data withScale:(CGFloat)scale;Swift
class func toImage(_ data: Data!, withScale scale: Double) -> Any!Parameters
databyte data
scalescale factor, 0.0 to 1.0
Return Value
image
-
Compress the image to byte data
Declaration
Objective-C
+ (NSData *)toData:(id)image andFormat:(enum GPKGCompressFormat)format;Swift
class func toData(_ image: Any!, andFormat format: GPKGCompressFormat) -> Data!Parameters
imageimage
formatcompress format
Return Value
byte data
-
Compress the image to byte data with quality
Declaration
Objective-C
+ (NSData *)toData:(id)image andFormat:(enum GPKGCompressFormat)format andQuality:(CGFloat)quality;Swift
class func toData(_ image: Any!, andFormat format: GPKGCompressFormat, andQuality quality: Double) -> Data!Parameters
imageimage
formatcompress format
qualityquality, 0.0 to 1.0, only used for GPKG_CF_JPEG
Return Value
byte data
View on GitHub
GPKGImageConverter Class Reference