Save as vs export

From Inkscape Wiki
Revision as of 21:20, 18 March 2008 by Faceman (talk | contribs)
Jump to navigation Jump to search

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.

Current status

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
idem but saves with a new name and this new document is used inside Inkscape. Same nag screen.
Save a copy
idem 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

  1. The user should not be able to shoot him/herself in the foot by saving only to a lossy format
  2. The number of items in the file menu should be reduced
  3. 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)

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.

Correspondance between bitmap and vector functionality

BitmapCairo PDF/PS
selection+hideby ID
selection-hideno equivalent (could be achieved by clipping though, or setting a crop box in the pdf)
customno equivalent (idem)

(see for an illustrated version)