Resource Base
Table of contents

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 Dynamsoft Barcode Reader Enumeration ImagePixelFormat

NSInteger pixelFormat

 

frameID

The property stores the frameID of the frame.

NSInteger frameID

 

quality

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. View more about the frame quality in enumeration EnumFrameQuality.

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

getOrientation

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
  1. @property(nonatomic, strong) DCEFrame *dceFrame;
    ...
    [dceFrame toUIImage];
    
  2. var dceFrame:DCEFrame! = nil
    ...
    dceFrame.toUIImage()
    

This page is compatible for:

Version 1.0

Is this page helpful?

YesYes NoNo

In this article:

version 2.3.20

  • Latest version
  • Version 4.x
    • Version 4.2.0
    • Version 4.0.2
    • Version 4.0.1
    • Version 4.0.0
  • Version 3.x
    • Version 3.0.3
    • Version 3.0.2
    • Version 3.0.1
    • Version 3.0.0
  • Version 2.x
    • Version 2.3.21
    • Version 2.3.20
    • Version 2.3.12
    • Version 2.3.11
    • Version 2.3.10
    • Version 2.3.5
    • Version 2.3.4
    • Version 2.3.3
    • Version 2.3.2
    • Version 2.3.1
    • Version 2.3.0
    • Version 2.1.4
    • Version 2.1.3
    • Version 2.1.1
    • Version 2.0.0
Change +