[Tuxpaint-devel] Template export from Open dialog
An award-winning drawing program for children of all ages
Brought to you by:
wkendrick
From: Bill K. <nb...@so...> - 2023-05-29 18:12:02
|
For a while now we've had the ability to export drawings to a location 'outside' of Tux Paint, and easier to access (e.g., on Linux, under $HOME/Pictures/TuxPaint/) -- via the "Export" button in the "Open" dialog. (There's also an animated GIF export feature, if you drill down into the "Slides" slideshow section, that arrived at the same time.) I've now added the ability to export a saved image into the user's personal Templates directory (e.g., on Linux, $HOME/.tuxpaint/templates/) This way, together with the Eraser tool (which now has a set of fuzzy-edged options), you can make a new picture in layers. It's obviously not as sophisticated as real Layers (capital-L) in apps like Photoshop & GIMP, but it will be helpful to some users. I can also see it being utilized for animations. Right now, you can create a background, and save it (let's call this picture #0). Then add your foreground options, and save out to a new drawing (picture #1; the first frame of the animation). Then you need to reload picture #0, redraw EVERYTHING in its new place, and save out to another new drawing (picture #2). Repeat. With a template, you can create a new picture using the background, draw things, and save it (picture #1). Then use the eraser, clone tool, etc. to make adjustments, and the save to a new drawing (picture #2). Anyway, along with the new feature, I've updated the docs (README, EXTENDING, manpage, etc.). This feature can be disabled with a new "notemplateexport" option. I'm about to add that to Tux Paint Config. Note - Tux Paint will do its best to avoid saving the same unmodified picture out to multiple new Templates. Each template's filename uses the original drawing's filename (which was the timestamp of the moment it was _first_ saved) as a prefix. For any image which matches that name, it will check if the files are an identical size (via stat()). If they happen to be, then it will check the image's dimensions (via libPNG). In the likely event that they are identical, it will then calculate a CRC checksum (via zlib) of the images to see if the file contents are the same. If they are, it will avoid exporting a new template, and state as much to the end user. Please try it out (`git pull` master branch), and let me know if there are any issues! Thanks! -- -bill! Sent from my computer |