# SaveImage

## Description

Saves the image at the given ID to the file name specified. The file will be placed in the app's write folder at the location currently specified by SetFolder. Alternatively you can specify a path beginning with a forward slash to choose a location from the root of the write folder, ignoring any SetFolder folder.
It is recommended that you use the extension ".png" at the end of the filename to save in PNG format. Some platforms may support additional extensions such as ".jpg" but this is not guaranteed to work on all platforms.

## Definition

SaveImage( iImageIndex, filename )

void agk::SaveImage( UINT iImageIndex, const char* filename )

## Parameters

- iImageIndex - The ID of the image to change.
- filename - The filename of the saved image