# Google Cloud Document Ai V1 Client - Class Image (2.7.0)

2.7.0 (latest) 2.6.1 2.5.1 2.4.1 2.3.0 2.2.2 2.1.3 2.0.0 1.14.0 1.13.1 1.12.2 1.9.0 1.8.2 1.7.0 1.6.0 1.5.0 1.4.0 1.3.0 1.2.2 1.1.1 1.0.1 Reference documentation and code samples for the Google Cloud Document Ai V1 Client class Image.

Rendered image contents for this page.

Generated from protobuf message `google.cloud.documentai.v1.Document.Page.Image`

## Namespace

Google \\ Cloud \\ DocumentAI \\ V1 \\ Document \\ Page

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ content` | `string` Raw byte content of the image. |
| `↳ mime_type` | `string` Encoding [media type (MIME type)](https://www.iana.org/assignments/media-types/media-types.xhtml) for the image. |
| `↳ width` | `int` Width of the image in pixels. |
| `↳ height` | `int` Height of the image in pixels. |

### getContent

Raw byte content of the image.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setContent

Raw byte content of the image.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getMimeType

Encoding [media type (MIME
type)](https://www.iana.org/assignments/media-types/media-types.xhtml)
for the image.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setMimeType

Encoding [media type (MIME
type)](https://www.iana.org/assignments/media-types/media-types.xhtml)
for the image.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getWidth

Width of the image in pixels.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setWidth

Width of the image in pixels.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getHeight

Height of the image in pixels.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setHeight

Height of the image in pixels.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |