Class iImageData
Stores the image data.
- Objective-C
- Swift
@interface iImageData : NSObject
class iImageData : NSObject
Method | Description |
---|---|
toUIImage |
Convert the ImageData to a UIImage . |
toUIImage
Convert the iImageData
to an UIImage
.
- Objective-C
- Swift
- (UIImage * _Nullable)toUIImage:(NSError *_Nullable *_Nullable)error;
func toUIImage() throws -> UIImage
Return Value
An UIImage
that converted from the iImageData
.
Code Snippet
- Objective-C
- Swift
NSError *error; UIImage *image = [imageData toUIImage:&error];
do{ image = try imageData.toUIImage() } catch{ // Add your code to deal with exceptions. }
Attribute | Descriptions |
---|---|
bytes |
The image data content in a byte array. |
width |
The width of the image in pixels. |
height |
The height of the image in pixels. |
stride |
The stride (or scan width) of the image. |
format |
The image pixel format used in the image byte array. |
bytes
The image data content in a byte array.
- Objective-C
- Swift
@property (nonatomic, nonnull) NSData* bytes;
var bytes: Data? { get set }
width
The width of the image in pixels.
- Objective-C
- Swift
@property (nonatomic, assign) NSInteger width
var width: Int { get set }
height
The height of the image in pixels.
- Objective-C
- Swift
@property (nonatomic, assign) NSInteger height
var height: Int { get set }
stride
The stride (or scan width) of the image.
- Objective-C
- Swift
@property (nonatomic, assign) NSInteger stride
var stride: Int { get set }
format
The image pixel format used in the image byte array.
- Objective-C
- Swift
@property (nonatomic, assign) EnumImagePixelFormat format
var format: EnumImagePixelFormat { get set }
orientation
The orientation of the image. It can be 0, 90, 180, or 270 based on the device orientation.
- Objective-C
- Swift
@property (nonatomic, assign) NSInteger orientation
var orientation: Int { get set }