Resource Base
Table of contents

DCEFrame

Removed in v4.0.

The DCEFrame is the class that stores pixel data and further information.

  • Objective-C
  • Swift
  1. @interface DCEFrame : NSObject
    
  2. class DCEFrame : iImageData
    
Method & Property Name Type/Return Value Description
bytes 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.
format 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.

imageData

The property stores the pixel data of the image.

  • Objective-C
  • Swift
  1. NSData* imageData
    
  2. var bytes: Data? { get set }
    

 

width

The property stores the pixel width of the image.

  • Objective-C
  • Swift
  1. NSInteger width
    
  2. var width: Int { get set }
    

 

height

The property stores the pixel height of the image.

  • Objective-C
  • Swift
  1. NSInteger height
    
  2. var height: Int { get set }
    

 

stride

The property stores the stride of the image.

  • Objective-C
  • Swift
  1. NSInteger stride
    
  2. var stride: Int { get set }
    

 

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

  • Objective-C
  • Swift
  1. NSInteger pixelFormat
    
  2. var pixelFormat: Int { get set }
    

 

frameID

The property stores the frameID of the frame.

  • Objective-C
  • Swift
  1. NSInteger frameID
    
  2. var frameID: Int { get set }
    

 

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.

  • Objective-C
  • Swift
  1. EnumFrameQuality quality
    
  2. var quality: EnumFrameQuality { get set }
    

 

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.

  • Objective-C
  • Swift
  1. BOOL isCropped
    
  2. var isCropped: Bool { get set }
    

 

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.

  • Objective-C
  • Swift
  1. CGRect cropRegion
    
  2. var cropRegion: CGRect { get set }
    

 

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.

  • Objective-C
  • Swift
  1. NSInteger orientation
    
  2. var orientation: Int { get set }
    

getOrientation

All examples of the orientation

 

toUIImage

The method converts the image to UIImage.

  • Objective-C
  • Swift
  1. - (UIImage * _Nullable)toUIImage:(NSError *_Nullable *_Nullable)error;
    
  2. func toUIImage() throws -> UIImage
    

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:

latest version

  • 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 +