GIMP Script-fu

Update of "sg-snapshot"

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.


Artifact ID: 1a3675de1e23541acb99886df95014da3e9da46b
Page Name:sg-snapshot
Date: 2015-02-11 10:56:32
Original User: saulgoode
Parent: c690d112e598a704b5950064ee84869df477a320
PDB Name:
sg-snapshot.scm (after the page appears, click on the "Download" command)


This script will save a snapshot of the current state of the image as a PNG file. Just the visible projection is saved, not the image itself.

The PNG file has a timestamp appended to its name and is saved in the same directory whence the original image came. For example, the file "/home/saul/Images/test.jpg" will have a snapshot such as "/home/saul/Images/test-29743.png". The time stamp is derived from the number of seconds since 1970, but rolls over every 24 hours.

If the original image has not yet been saved to a file then the snapshot will be placed in the GIMP startup directory with the basename of "Untitled" (e.g., "/home/saul/Untitled-29856.png").

The purpose of this script is to facilitate creating animations of the process of editing an image. Typically, a user would use this script by going through all the steps of editing his image -- painting, filtering, applying transforms, etc -- and then going back to the start of the image's UNDO history (either by repeatedly performing "Edit->Undo" or by navigation in the Undo History dialog). The user would then execute the script, perform an "Edit->Redo", and repeat these two steps until finished. Note: if a keyboard shortcut is assigned to the Snapshot command -- such as CTL-d -- then this process becomes quite trivial (i.e., CTL-d, CTL-y, CTL-d, CTL-y, CTL-d, CTL-y, ...).

After all of the snapshots are saved, "File->Load As Layers" can be used to create a single, multi-layer animation of the history steps. Alternately, GIMP's GAP plug-in could be used to create videos of the process.

The following animation is a crude example of what can be accomplished.