# Javascript: TXTextControl.ImageFormat Enumeration

> Specifies the file format of an image.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Enumeration
- **Introduced:** 28.0
- **Path:** DS Server > Reference > JavaScript API > Javascript: TXTextControl.ImageFormat Enumeration
- **388 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/imageformat-enumeration/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/imageformat-enumeration/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/imageformat-enumeration/llms-full.txt

---

### Description

Specifies the file format of an image.

### Members

| Member | Description |
|---|---|
| Bmp | Bitmap image format. |
| Emf | Enhanced metafile image format. |
| Gif | Graphics Interchange Format image format. |
| Jpeg | Joint Photographic Experts Group image format. |
| Png | W3C Portable Network Graphics image format. |
| Tiff | Tagged Image File Format image format. |
| Wmf | Windows metafile image format. |

### Examples

The following example uses `TXTextControl.ImageFormat.Bmp` (bitmap image format.) in a document-editing workflow.

```javascript
function onTxError(error) {
    console.error("TX Text Control error:", error.msg);
    error.handled = true;
}

function applyImageFormat(page) {
    page.getImage(
        TXTextControl.ImageFormat.Bmp,
        100,
        TXTextControl.PageContent.Background,
        function(result) {
            console.log("get image result:", result);
        },
        onTxError
    );
}
```

---

## Nearby

- **Previous:** [Javascript: TXTextControl.IfField.trueText Property](https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol-iffield/truetext-property/llms-full.txt)
- **Next:** [Javascript: TXTextControl.ImageInsertionMode Enumeration](https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/imageinsertionmode-enumeration/llms-full.txt)
