RFX-GIMP

Artifact [b0c368bd67]
Login

Artifact b0c368bd678e10731a575a6672a12b09176c3563:

Wiki page [rfx-save-frame] by saul 2012-03-27 12:43:09.
D 2012-03-27T12:43:09.936
L rfx-save-frame
U saul
W 1239
'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 beforehand.</li></ul>
Z dcfa7e4cf5aaa39341fd29ef5ccd265f