# DrawImageOptions

## Content

[**DsPdfJS API v9.1.3**](../README)

***

[DsPdfJS API](../globals) / DrawImageOptions

# Type Alias: DrawImageOptions

> **DrawImageOptions** = `object`

Provides options for drawing the image.

## Properties

### alignX?

> `optional` **alignX**: [`ImageAlignHorz`](../enumerations/ImageAlignHorz)

The horizontal alignment of the image. The default is "Left".

***

### alignY?

> `optional` **alignY**: [`ImageAlignVert`](../enumerations/ImageAlignVert)

The vertical alignment of the image. The default is "Top".

***

### clipBounds?

> `optional` **clipBounds**: [`Bounds`](Bounds) \| `null`

The clipping rectangle on the target surface.

***

### interpolationMode?

> `optional` **interpolationMode**: [`InterpolationMode`](../enumerations/InterpolationMode)

The sampling mode to use when drawing images with resizing.
This property does not affect drawing to [PdfContext](../classes/PdfContext).

***

### keepAspectRatio?

> `optional` **keepAspectRatio**: `boolean`

Indicates whether to keep the aspect ration of the image when resizing. The default if false.

***

### opacity?

> `optional` **opacity**: `number`

The image opacity. The default is 1.

***

### scaleToFill?

> `optional` **scaleToFill**: `boolean`

If true, the image is scaled down as much as possible but covers the entire destination rectangle.
If false, the image is scaled up as much as possible, but does not extend beyond the bounds of the destination rectangle.
The value of this property is ignored if keepAspectRatio is false. The default if false.
