# DSScaledColourImageUnit

The `ScaledDownColourImageUnit` class extends the `IntermediateResultUnit` class and represents a scaled-down colour image unit.

## Definition

*Assembly:* DynamsoftCaptureVisionBundle.xcframework

<div class="sample-code-prefix"></div>
>- Objective-C
>- Swift
>
>1. 
```objc
@interface DSScaledColourImageUnit : DSIntermediateResultUnit
```
2. 
```swift
class ScaledDownColourImageUnit : IntermediateResultUnit
```

## Methods

| Method | Description |
|------- |-------------|
| [`setImageData`](#setimagedata) | Sets the image data for the scaled-down colour image. |
| [`getImageData`](#getimagedata) | Gets the image data for the scaled-down colour image. |

## Inherited Methods

The following methods are inherited from class [`IntermediateResultUnit`](https://www.dynamsoft.com/capture-vision/docs/mobile/programming/ios/api-reference/core/intermediate-results/intermediate-result-unit.md).

| Method | Description |
|------- |-------------|
| [`getHashId`](https://www.dynamsoft.com/capture-vision/docs/mobile/programming/ios/api-reference/core/intermediate-results/intermediate-result-unit.md#gethashid) | Gets the hash ID of the unit. The hash ID is the unique identifier for the intermediate result unit. |
| [`getOriginalImageHashId`](https://www.dynamsoft.com/capture-vision/docs/mobile/programming/ios/api-reference/core/intermediate-results/intermediate-result-unit.md#getoriginalimagehashid) | Gets the hash ID of the original image associated with this unit. |
| [`getOriginalImageTag`](https://www.dynamsoft.com/capture-vision/docs/mobile/programming/ios/api-reference/core/intermediate-results/intermediate-result-unit.md#getoriginalimagetag) | Gets the tag associated with the original image. |
| [`getType`](https://www.dynamsoft.com/capture-vision/docs/mobile/programming/ios/api-reference/core/intermediate-results/intermediate-result-unit.md#gettype) | Gets the type of the intermediate result unit, defined by the enumeration [`IntermediateResultUnitType`](https://www.dynamsoft.com/capture-vision/docs/mobile/programming/ios/api-reference/core/enum/intermediate-result-unit-type.md). |
| [`getTransformMatrix`](https://www.dynamsoft.com/capture-vision/docs/mobile/programming/ios/api-reference/core/intermediate-results/intermediate-result-unit.md#gettransformmatrix) | Gets the transformation matrix via [`DSTransformMatrixType`](https://www.dynamsoft.com/capture-vision/docs/mobile/programming/ios/api-reference/core/enum/transform-matrix-type.md). |
| [`clone`](https://www.dynamsoft.com/capture-vision/docs/mobile/programming/ios/api-reference/core/intermediate-results/intermediate-result-unit.md#clone) | Creates a copy of the intermediate result unit. |
| [`replace`](https://www.dynamsoft.com/capture-vision/docs/mobile/programming/ios/api-reference/core/intermediate-results/intermediate-result-unit.md#replace) | Replaces the content of the intermediate result unit. |

### setImageData

Sets the image data for the scaled-down colour image.

<div class="sample-code-prefix"></div>
>- Objective-C
>- Swift
>
>1. 
```objc
-(NSInteger)setImageData:(DSImageData *)imageData;
```
2. 
```swift
func setImageData(_ imageData: ImageData?) -> Int
```

**Parameters**

`imageData`: A `DSImageData` object as the image data of the down-scaled colour image.

**Return Value**

Returns the `ErrorCode` if failed. Otherwise, returns 0.

### getImageData

Gets the image data for the scaled-down colour image.

<div class="sample-code-prefix"></div>
>- Objective-C
>- Swift
>
>1. 
```objc
-(nullable DSImageData *)getImageData;
```
2. 
```swift
func getImageData() -> ImageData?
```

**Return Value**

The `DSImageData` for the scaled-down colour image.
