layout | title | description | keywords | needAutoGenerateSidebar | needGenerateH3Content | noTitleIndex | permalink |
---|---|---|---|---|---|---|---|
default-layout |
Dynamsoft Core Objective-C & Swift Class - iImageData |
This page shows the iImageData class of Dynamsoft Core for iOS SDK. |
iImageData, objective-c, oc, swift |
true |
true |
true |
/programming/ios/api-reference/image-data.html |
You are viewing a history document page of Dynamsoft Document Normalizer v1.0.30.
Stores the image data.
>- Objective-C >- Swift > >1. ```objc @interface iImageData : NSObject ``` 2. ```swift class iImageData : NSObject ```Attribute | Type | Description |
---|---|---|
bytes |
NSData* | The array of bytes that stores the pixel buffer of the image. |
width |
NSInteger | The width of the image in pixels. |
height |
NSInteger | The height of the image in pixels. |
stride |
NSInteger | The stride is measured by the byte length of each line in the pixel buffer. |
format |
NSInteger | The image pixel format used in the image byte array. View [EnumImagePixelFormat ]({{ site.enumerations }}image-pixel-format.html?src=android) for all supported image pixel formats. |
orientation |
NSInteger | The orientation of the image buffer contained in this frame data. |
Method | Description |
---|---|
toUIImage |
Convert the ImageData object to a UIImage object. |
The image data content in a byte array.
>- Objective-C >- Swift > >1. ```objc NSData* bytes ``` 2. ```swift var bytes: Data? { get set } ```
The width of the image in pixels.
>- Objective-C >- Swift > >1. ```objc NSInteger width ``` 2. ```swift var width: Int { get set } ```
The height of the image in pixels.
>- Objective-C >- Swift > >1. ```objc NSInteger height ``` 2. ```swift var height: Int { get set } ```
The stride (or scan width) of the image.
>- Objective-C >- Swift > >1. ```objc NSInteger stride ``` 2. ```swift var stride: Int { get set } ```
The image pixel format used in the image byte array.
>- Objective-C >- Swift > >1. ```objc EnumImagePixelFormat format ``` 2. ```swift var format: EnumImagePixelFormat { get set } ```The orientation of the image buffer contained in this frame data. The value is the angle that the camera image needs to be rotated clockwise so it shows correctly on the display in its natural orientation. It is 0, 90, 180, or 270. A typical value for this is 90 as most camera modules record the frames in landscape right orientation. Rotating a landscape right frame by 90 degrees will show it correctly on the display in portrait orientation (which is the natural device orientation of most phones).
>- Objective-C >- Swift > >1. ```objc NSInteger orientation ``` 2. ```swift var orientation: Int { get set } ```Convert the ImageData
object to a UIImage
object.
Return Value
A UIImage
object.