GIMP Script-fu

Artifact Content
Login

Artifact 1a3675de1e23541acb99886df95014da3e9da46b:

Wiki page [sg-snapshot] by saulgoode 2015-02-11 10:56:32.
D 2015-02-11T10:56:32.220
L sg-snapshot
P c690d112e598a704b5950064ee84869df477a320
U saulgoode
W 2261
<dl>
<dt><b>Command:</b> <dd>Snapshot</dd></dt>
<dt><b>Menu:</b> <dd>"<Image>/File/Snapshot"</dd></dt>
<dt><b>PDB Name:</b> <dd>script-fu-sg-snapshot</dd></dt>
<dt><b>Download:</b> <dd>[https://chiselapp.com/user/saulgoode/repository/script-fu/artifact/0dccd13f85d36f9041d23eb23fe1edfdf9d955e4|sg-snapshot.scm] (after the page appears, click on the "Download" command)</dd></dt>
<dt><b>License:</b> <dd>[copyright|GPLv2+]</dd></dt>

<dt><b>Description:</b> <dd>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.

<center>
<img src="http://barn.kerosenecow.net/mgoblin_media/media_entries/64/snapshot-history.gif" />
</center>

</dd></dt>
</dl>

Z 67dc3d06afa1f9906236cab7d7e68889