Thanks for downloading Dynamsoft Label Recognizer Package!
Your download will start shortly. If your download does not begin, click here to retry.
DCEFrame
The DCEFrame
is the class that stores pixel data and further information.
@interface DCEFrame : NSObject
Method & Property Name | Type/Return Value | Description |
---|---|---|
imageData |
NSData * | The property stores the pixel data of the image. |
width |
NSInteger | The property stores the pixel width of the image. |
height |
NSInteger | The property stores the pixel height of the image. |
stride |
NSInteger | The property stores the stride of the image. |
pixelFormat |
NSInteger | The property stores the pixel format of the image. |
frameID |
NSInteger | The property stores the frameID of the frame. |
quality |
EnumFrameQuality |
The property stores the quality of the DCEFrame image. User have to enable the frame filter feature to get the quality (high/low) of the DCEFrame . Otherwise, the frame quality will be unknown. |
isCropped |
BOOL | The property stores a boolean value that recording whether the image is cropped. The frames can be cropped if fast mode is enabled. |
cropRegion |
CGRect | The property stores a CGRect value that means the crop region of the image (if the image is cropped). If the image is not cropped, the value will be null. |
orientation |
NSInteger | The property stores an int value that means the rotation angle of the image. The value is 0, 90, 180 or 270 with depends on the device orientation. |
toUIImage |
UIImage * | The method converts the image to UIImage to make it visible on the UI. |
imageData
The property stores the pixel data of the image.
NSData* imageData
width
The property stores the pixel width of the image.
NSInteger width
height
The property stores the pixel height of the image.
NSInteger height
stride
The property stores the stride of the image.
NSInteger stride
pixelFormat
The property stores the pixel format of the image. The property value is one of the Enumeration value of ImagePixelFormat
. Currently, the image output formats of DCEFrame
are NV21 or ARGB_8888. View more in EnumImagePixelFormat
NSInteger pixelFormat
frameID
The property stores the frameID
of the frame.
NSInteger frameID
quality
The property indicates the image quality of the DCEFrame
. View more in EnumFrameQuality
. User have to enable the frame filter feature to get the quality (high/low) of the DCEFrame
. Otherwise, the frame quality will be unknown.
EnumFrameQuality quality
isCropped
The property stores a boolean value that recording whether the image is cropped. The frames can be cropped if fast mode
is enabled. Property value true
means the image is cropped and false
means the image has never been cropped.
BOOL isCropped
cropRegion
The property stores a CGRect value that means the crop region of the image (if the image is cropped). If the image is not cropped, the value will be null.
CGRect cropRegion
orientation
The property stores an int value that means the rotation angle of the image. The value is 0, 90, 180 or 270, which depends on the device orientation.
NSInteger orientation
All examples of the orientation
toUIImage
The method converts the image to UIImage
to make it visible on the UI.
- (UIImage*)toUIImage;
Return Value
The converted image.
Code Snippet
- Objective-C
- Swift
@property(nonatomic, strong) DCEFrame *dceFrame; /* ... */ [dceFrame toUIImage];
var dceFrame:DCEFrame! = nil /* ... */ dceFrame.toUIImage()