PAGImage Class Reference

Inherits from NSObject
Declared in PAGImage.h

+ FromCGImage:

Creates a PAGImage object from a CGImage object, return null if it’s not valid CGImage object.

+ (PAGImage *)FromCGImage:(CGImageRef)cgImage

Declared In

PAGImage.h

+ FromPath:

Creates a PAGImage object from a path of a image file, return null if the file does not exist or it’s not a valid image file.

+ (PAGImage *)FromPath:(NSString *)path

Declared In

PAGImage.h

+ FromBytes:size:

Creates a PAGImage object from the specified byte data, return null if the bytes is empty or it’s not a valid image file.

+ (PAGImage *)FromBytes:(const void *)bytes size:(size_t)length

Declared In

PAGImage.h

+ FromPixelBuffer:

Creates a PAGImage object from the specified CVPixelBuffer, return null if the CVPixelBuffer is invalid.

+ (PAGImage *)FromPixelBuffer:(CVPixelBufferRef)pixelBuffer

Declared In

PAGImage.h

– width

Returns the width in pixels of the image.

- (NSInteger)width

Declared In

PAGImage.h

– height

Returns the height in pixels of the image.

- (NSInteger)height

Declared In

PAGImage.h

– scaleMode

Returns the current scale mode.

- (PAGScaleMode)scaleMode

Declared In

PAGImage.h

– setScaleMode:

Specifies the rule of how to scale the image content to fit the original image size. The matrix changes when this method is called.

- (void)setScaleMode:(PAGScaleMode)value

Declared In

PAGImage.h

– matrix

Returns a copy of current matrix.

- (CGAffineTransform)matrix

Declared In

PAGImage.h

– setMatrix:

Set the transformation which will be applied to the image content. The scaleMode property will be set to PAGScaleMode::None when this method is called.

- (void)setMatrix:(CGAffineTransform)value

Declared In

PAGImage.h