> For the complete documentation index, see [llms.txt](https://docs.tricloudnexus.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tricloudnexus.io/edge/nexus-modules/data-connector-modules/scenecontrollermodule/direct-commands/getimagetofile.md).

# GetImageToFile

This method is used to acquire an image from the attached camera, and storing the image in the host file system.

### **Method Name:**

GetImageToFile

### **Payload:**

The direct command requires a file name and optionally an exposure time measured in microseconds.

The file name is relative to the following folder, that the SceneControllerModule has assigned as a volume mount, which is "/etc/aziot/images/incoming".

```
{
    "fileName": "image.bmp",
    "exposureUs": 25000
}
```

The above command acquires an image with an exposure time of 25000 microseconds (25 milliseconds), with the file name "image.bmp". The blob is saved in the host file system on the location "/etc/aztio/images/incoming/image.bmp". If the file exists, it will be overwritten.

ExposureUs is optional, and the default value is 15000 microseconds.

### **Return value**

The direct command returns an OperationResult that indicates either success or failure.
