Scratch for Java

GifRecorder::saveFrame()

This works in a project you run on your own computer, but not in the examples you can start here in the browser. There is no file system, no video encoder and no OpenGL behind a web page, so calling it there tells you as much and does nothing.

Saves the current frame of the applet as a GIF image.

This method captures the current frame from the applet, sets the frame rate, and adds the frame to the GIF encoder. If the applet's pixels are null, the frame is not saved.

Note: This method catches and ignores any NullPointerException that may occur.

Syntax

Java

.saveFrame()

Return

void

saveFrame()

Create Shareable URL

Select Sections