Completed single image export function

From "Open" dialog, select an image (single click, or use
arrow keys / etc., to highlight the image), then select the
"Export" button at the lower right.

The image will be saved in the export directory.  By default
this will be based on the config found via the XDG_CONFIG_HOME
environment variable, which is scanned for a "XDG_PICTURES_DIR"
setting.  If none is found, "Pictures" in the directory specified
by the HOME env. var. will be used.  In both cases, a new
"TuxPaint" subdirectory will be created, and exports will be placed
there.

The export location may be overridden using the "--exportdir"
command-line option or "exportdir" config file option
(e.g., "--exportdir /path/to/dir" or "exportdir=/path/to/dir",
respectively).  In this case, the directory is assumed to preexist,
and no "TuxPaint" subdirectory will be made.

There's currently no way to disable the export feature altogether.
If there's demand, we can add it as a simplification option.

Finally, this feature simply copies the PNG file (but no extra
data files) from Tux Paint's "saved" directory to the export dir.

Closes https://sourceforge.net/p/tuxpaint/feature-requests/192/
This commit is contained in:
Bill Kendrick 2020-07-26 14:10:03 -07:00
parent 28b28d583e
commit b0a2b4dacc
5 changed files with 205 additions and 50 deletions

View file

@ -11,15 +11,22 @@ $Id$
2020.July.25 (0.9.25)
* New Features
------------
* [WIP] GIF export option from Open -> Slideshow dialog.
* Utilizes "gifenc", public domain by Marcel Rodrigues:
https://github.com/lecram/gifenc
* Depends on "libimagequant", from the "pngquant2" project:
https://github.com/ImageOptim/libimagequant
(GPL v3 or later, for Free/Libre Open Source Software)
* Uses XDG user dirs settings, if available, to determine
where to store them, or "~/Pictures", otherwise.
"--exportdir" option can be used to override this.
* Export drawings:
* GIF export option from the Open -> Slideshow dialog.
* Utilizes "gifenc", public domain by Marcel Rodrigues:
https://github.com/lecram/gifenc
* Depends on "libimagequant", from the "pngquant2" project:
https://github.com/ImageOptim/libimagequant
(GPL v3 or later, for Free/Libre Open Source Software)
* WORK IN PROGRESS
(Closes https://sourceforge.net/p/tuxpaint/feature-requests/191/)
* Single image (PNG) export from the Open dialog.
(Closes https://sourceforge.net/p/tuxpaint/feature-requests/192/)
* Both utilize XDG user dirs settings, if available, to determine
where to store them, or "~/Pictures", otherwise. In those cases,
files are stored in a new "TuxPaint" subdirectory.
* The "--exportdir" option can be used to override the default
location (but a "TuxPaint" subdir. will NOT be placed there).
* Ports & Building
----------------