Thread: [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 |
From: Pere P. i C. <per...@gm...> - 2023-05-30 21:18:19
|
Hi, works fine in my box, the only thing I've noticed is that one has to go to the filesystem to remove the no more needed templates. Maybe add a way to remove added templates? HTH Pere El dl. 29 de 05 de 2023 a les 11:11 -0700, en/na Bill Kendrick va escriure: > 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! > |
From: Bill K. <nb...@so...> - 2023-05-30 23:57:57
|
On Tue, May 30, 2023 at 11:18:09PM +0200, Pere Pujal i Carabantes wrote: > Hi, works fine in my box Thanks for testing it out! > the only thing I've noticed is that one has to go to the filesystem > to remove the no more needed templates. > > Maybe add a way to remove added templates? Would we want to allow users to delete ANY personal template? Or only the ones created within Tux Paint via the "Open" dialog? If the latter, I'd need a way to flag them (perhaps a datafile that sites alongside them). Since the templates appear in the "New" dialog, we would need to add an "Erase" button there (perhaps only appearing, or only appearing as accessible) when a personal template is currently selected. That seems a little weird, but nowhere else really makes sense! And of course, I would probably want to be able to make the "New" -> "Erase [template]" feature something that could be deactivated via a simplification setting. In fact, I already have a feature request (oof, from 2009!) to make the "Open" -> "Erase [saved drawing]" feature inaccessible via a simplification setting. [1] While these kinds of simplifications may sound a little weird, my goal is for Tux Paint to be configurable in such a way that it's VERY difficult to accidentally clobber things, which can lead to tears in the youngest of users who might not be good at using a mouse yet. (See, for example, the "saveover=new" option.) Disk space is cheap. [3] [1] https://sourceforge.net/p/tuxpaint/feature-requests/129/ [2] https://tuxpaint.org/docs/en/html/OPTIONS.html#saving [3] I know first-hand that data loss can be emotionally traumatic. ;-) When I was around 7 or 8 years old, I was writing a game in BASIC on my Timex Sinclair 1000 (US version of ZX81), and had not yet saved it (to audio cassette tape, of course!) My dad was going to work on something electrical and accidentally flipped the breaker that powered my bedroom. Snoopy pancake flipping game, lost forever. A few years later, I was making a reasonable facsimile of Pac-Man in BASIC on my Atari 8-bit. Unfortunately a bug in the particular version of BASIC I had could cause files saved to disk to go corrupt, after saving a certain number of times! Blocky Pac-Man clone, lost forever. I somehow managed to make a pretty playable (if not visually attractive, yet) clone of the game KLAX for Linux. I was about to roll a tarball and post it online as an alpha version, when I decided to be clever and clean up my Makefile a bit. I accidentally got some $@ or $< confused, and accidentally overwrote my C source file with the executable. KLAX clone, lost forever. (I have proof of its existence, at least! ;) https://www.youtube.com/watch?v=mQpHdSIi2wc ... SIGH!) |
From: Shin-ichi T. <dol...@wm...> - 2023-05-31 00:46:41
|
On Tue, 30 May 2023 16:57:47 -0700, Bill Kendrick wrote: >On Tue, May 30, 2023 at 11:18:09PM +0200, Pere Pujal i Carabantes wrote: >Would we want to allow users to delete ANY personal template? >Or only the ones created within Tux Paint via the "Open" dialog? >If the latter, I'd need a way to flag them (perhaps a datafile >that sites alongside them). I think the latter would be better so far. It would make such users who deleted some templates irritate if they appear again after updating Tux Paint. |
From: Pere P. i C. <per...@gm...> - 2023-05-31 16:49:32
|
El dt. 30 de 05 de 2023 a les 16:57 -0700, en/na Bill Kendrick va escriure: > On Tue, May 30, 2023 at 11:18:09PM +0200, Pere Pujal i Carabantes wrote: > > Hi, works fine in my box > > Thanks for testing it out! > > > > the only thing I've noticed is that one has to go to the filesystem > > to remove the no more needed templates. > > > > Maybe add a way to remove added templates? > > Would we want to allow users to delete ANY personal template? > Or only the ones created within Tux Paint via the "Open" dialog? > If the latter, I'd need a way to flag them (perhaps a datafile > that sites alongside them). I'd allow just the created with Tux Paint ones, custom templates added via filesystem can be removed via filesystem. > > Since the templates appear in the "New" dialog, we would need to add > an "Erase" button there (perhaps only appearing, or only appearing as > accessible) when a personal template is currently selected. > That seems a little weird, but nowhere else really makes sense! Maybe in a "manage data" tool that allows parents/teachers/big childs to add/remove starters, templates, stamps, brushes, etc Obviously, adding the "Erase" button in the "New" dialog would do the job for now... Best Pere > > And of course, I would probably want to be able to make the > "New" -> "Erase [template]" feature something that could be > deactivated via a simplification setting. > > In fact, I already have a feature request (oof, from 2009!) to > make the "Open" -> "Erase [saved drawing]" feature inaccessible > via a simplification setting. [1] > > While these kinds of simplifications may sound a little weird, > my goal is for Tux Paint to be configurable in such a way that > it's VERY difficult to accidentally clobber things, which can > lead to tears in the youngest of users who might not be good > at using a mouse yet. (See, for example, the "saveover=new" > option.) Disk space is cheap. [3] > > > [1] https://sourceforge.net/p/tuxpaint/feature-requests/129/ > > [2] https://tuxpaint.org/docs/en/html/OPTIONS.html#saving > > [3] I know first-hand that data loss can be emotionally traumatic. ;-) > > When I was around 7 or 8 years old, I was writing a game in BASIC > on my Timex Sinclair 1000 (US version of ZX81), and had not yet > saved it (to audio cassette tape, of course!) My dad was going to > work on something electrical and accidentally flipped the breaker > that powered my bedroom. Snoopy pancake flipping game, lost forever. > > A few years later, I was making a reasonable facsimile of > Pac-Man in BASIC on my Atari 8-bit. Unfortunately a bug in the > particular version of BASIC I had could cause files saved to > disk to go corrupt, after saving a certain number of times! > Blocky Pac-Man clone, lost forever. > > I somehow managed to make a pretty playable (if not visually > attractive, yet) clone of the game KLAX for Linux. I was about > to roll a tarball and post it online as an alpha version, when > I decided to be clever and clean up my Makefile a bit. > I accidentally got some $@ or $< confused, and accidentally > overwrote my C source file with the executable. KLAX clone, > lost forever. (I have proof of its existence, at least! ;) > https://www.youtube.com/watch?v=mQpHdSIi2wc ... SIGH!) > > > _______________________________________________ > Tuxpaint-devel mailing list > Tux...@li... > https://lists.sourceforge.net/lists/listinfo/tuxpaint-devel |