'rfx-save-frame' is a Script-fu procedure that is available for all RFX-GIMP scripts to use for saving frames to disk. Calling 'rfx-save-frame' would typically be the last operation that the [loop-code|loop code] of an RFX-GIMP filter performs.

The procedure accepts two parameters: the image ID of the frame and a string containing the base filename of the frame. The filename should not include the path, nor should it include the extension.

In almost all cases, the invocation of 'rfx-save-frame' would just use the LiVES variable $frame for the base filename.

<pre>(rfx-save-frame image "$frame")</pre>

Note: quotes are required when Perl strings are inserted into RFX-GIMP scripts so that Script-fu recognizes them as strings.

'rfx-save-frame' will save the currently active layer of the specified 'image' after performing the following checks:

<ul><li>If saving to a JPEG file, the layer is flattened against YUV black, thus removing any alpha channel. Note that only the active layer is saved, all others are ignored.</li>
<li>If saving to a PNG file, grayscale and indexed images are first converted to RGB mode. Only the active layer is saved, so any merging/flattening should be performed