Save as vs export
Sort out Save as vs Export formats
This blueprint stems from several discussions on the mailing list about which format should be available in Save as or in Export and whether some should be exclusively available in only one of those.
There are different opinions on the current status of this functionality in Inkscape which is:
- contains all possible file formats (except PNG) and saves with the same name. If a format other than Inkscape SVG (or SVGZ) is used, a nag screen is displayed at close time, to warn the user about possible data loss.
- Save as
- as above but also saves with a new name and this new document is used inside Inkscape. Same nag screen.
- Save a copy
- as above but the new document is not used inside Inkscape. It is just written on the disk and work continues in the current document. Hence saving as a format different from SVG does not cause the nag screen to appear (the working document is still SVG)
- saves the drawing or part of it as a PNG raster file, with a new name, and keep the working image as SVG. The Export dialog can stay open at all times.
As a reminder, current save formats are (at least): Inkscape SVG(Z), Plain SVG(Z), PS, EPS, Cairo PDF, Cairo PS, POV, ODG, TEX, AI (8.0), DXF, AutoCAD DXF, EPSI, GPL, XCF, XAML, Inkscape svg with media ZIP, EMF.
Some people are just fine with this, some other think it is a mess, some other think a middle ground should be found between this and changing everything.
The new behavior is based on the principles that
- The user should not be able to shoot him/herself in the foot by saving only to a lossy format
- The number of items in the file menu should be reduced
- Functionality (or UI at least) should be consistent for all save/export format
Principle 1 means that Save and Save as should only save as Inkscape SVG(Z) (and possibly plain SVG for people that only work in plain SVG?).
Principle 2 means that one of Save a copy and Export has to go since they are kind of redundant.
Principle 3 means that, when it is possible, saving in vector formats should offer the option to save only one object or a specific part of the canvas to the saved image, as export to PNG does. Furthermore, the UI should be consistent for this functionality.
The proposed behavior is therefore
- saves only as Inkscape SVG(Z) (Plain SVG(Z)? People, please give opinions on this. I don't personally work with SVG as the end format so can't tell what the workflow is in this case. Plain SVG is lossy from the editing point of view but maybe that is a major pain to have two copies of the same document when working with what is supposed to be Inkscape's native format)
- Save as
- idem, with a new name and setting the working document to be the new file
- Save a copy (incremental)
- saves current file in its current working format (Inkscape SVG(Z) (Plain SVG(Z)) with the specified increment appended. The increment expression would be on a panel of the Document Preferences dialog, but should default to just a simple incremental number based on the existence of other files with the same name and an appended number.
- saves to all vector and bitmap (and other e.g. GPL) formats, comprising Inkscape SVG(Z) and Plain SVG(Z), with a new name, keeping the working document in place. The export dialog should present a similar set of options for all file types, disable those not available for the particular file type selected, in a dialog as compact as possible (since it is meant to stay open at all time)
A further proposed addition
When saving an optional automated export could be performed (see wishlist 171362). A common routine is to save a page as SVG then export the page to PNG. It's a little feature but it could enhance the app. People using OS without SVG thumbnails (or indeed those in which the thumbnails suck) could use this to export a low dpi PNG or by setting the export folder as a website folder a portfolio of all work could be easily made.
Description of the export dialog
- a file chooser at the top, and file type defaulting to "Guess from extension". The chosen filename should be shown relative to the current document and use and ellipsis to always show the extension (so that it is immediately obvious which file type is exported)
- batch export all selected object check box*
- four tabs underneath (Page, Drawing, Objects, Custom)**
- depending on the file type, enable or disable batch export
- when batch export is unchecked/unavailable, enable or disable each tab depending on the file type
- PNG: enable all
- PDF/PS/EPS: enable page, drawing, objects
- other graphic formats: enable page or drawing depending on the behaviour of the file type
- other formats (GPL): disable all
(*) To simplify matters, if batch export is restricted to PNG, it could be made a separate menu entry in the file menu Indeed, there is very little user interaction left in the dialog when it is checked (basically one can only click "Export") so it may be more efficiently done in one action (File > Batch export to bitmap) instead of three (File > Export bitmap, tick batch export, Click export). With SHIFT+ALT+CTRL+E as keyboard shortcut and a discardable nag screen (no they are not always evil) about the fact that it overwrites previous files it seems like a good solution to me. If batch export is implemented in other formats, then this menu-item could mean "batch-export in the last used format".
(**) Selection becomes Objects and exports only selected objects (as with "hide all except selected objects" now). Custom behaves by default as "Selection" does now: the coordinates are the one of current selection and, when only one object is selected, the filename to which it is saved is saved in the SVG. When coordinates are changed manually and it reverts to how custom works currently. Does that make sense? Another solution would be to have Page, Drawing, Object, Selection/Selected area, Custom but it would make the dialog bigger.
Alternative proposal for the export dialog
This is a somewhat more ambitious proposal for the export dialog, which allows more flexibility in what is exported into which format and under what name. It also makes accessing the various functionalities a bit more regular through the use of docked windows.
From top to bottom, the window has the following fields:
-what to export -whereto / in what format -the ability to save the "export target" for later reuse
- What to export
- a drop down list containing the following choice, with a textfield or number field appearing whenever needed:
- the whole drawing
- the page
- a rectangle, with fields for the coordinates. The initial value of the coordinates are those of the selection
- a group/layer, with a text-field for the name. Maybe allow several names in the field to export several groups, each to its own file (then default the list to the current selection)
- all groups matching a regexp, with a text-field for the regexp. Each group is exported to its own file
- the selection, as a temporary group.
- Where to export
- A text field for the destination, with access to the file chooser.
- A button "advanced settings" for all file-format dependent settings
- Four fields: Width/Height and Xdpi/Ydpi, for the size of the exported image, where changes to W impact Xdpi and a check box for preserve aspect ratio. W and H are greyed out when exporting several groups.
- In the text field, it is possible to use interpolation sequences: %t is the time, %g is the name of the group being exported, %e its export hint. (other are possible if needed). The field should get a reasonnable default when exporting several groups so that medium-power users don't need to look at the doc to be able to use that functionnality.
- A big export button
- Export targets.
- Keep a list of ready to use targets, such as "export page as pdf", "do incremental save as svg", or "export all groups named export* to pdf". Have it be filled with reasonnable defaults and let the user add or remove any exports he does to the list.
- Allow one-click export from the list, and have an export of the list be selected. When hitting Ctrl-Shift-E, do that export.
Correspondance between bitmap and vector functionality
|selection-hide||no equivalent (could be achieved by clipping though, or setting a crop box in the pdf)|
|custom||no equivalent (idem)|
(see http://jo.irisson.free.fr/dropbox/test-export.zip for an illustrated version)