Tasks

  • Pepe creates a lot of website mockups with GIMP. He’s using GIMP’s native format XCF to store all his layers and guidelines, saving those to ~/gfx/mockups/, but exports the final mockup as PNG to ~/public_html/mockups/. Pepe wants to export the PNG pretty much every time he makes a change to the XCF.

Workflow Analysis

  1. Pepe loads the xcf and makes a few edits
  2. Pepe brings up the save dialog using save a copy. Navigating to the export directory is easy, because pepe created a bookmark for ~/public_html/mockups/. However pepe does need to bring up the path browser by pushing the Browse for other folders disclosure triangle because the target directory is different to the directory holding the XCF.
  3. Pepe needs to rename the filename suffix from xcf to png
  4. After pushing enter (yay! works here) a dialog warns Pepe that he’s about to replace an earlier version of the PNG. Pepe presses Enter one more time. GIMP warns Pepe that exporting to PNG will discard the layer information. Pepe pushes Enter to merge the layers. Now GIMP opens up a dialog for PNG export options. Pepe actually tweaks these options very rarely and hits Enter yet again.

As you can see from the above there’s a couple of problems during the task especially with regard to error prevention.

  • There is a lot of alerts in the PNG export process making the process very daunting if done often. But that is exactly the case with Pepe. The process of making a layout mockup is one of many iterations.

It will be easy to dismiss the wrong dialog such as exporting a layer mask instead of the artwork by mistake. All it takes is having the mask active before the export. Pepe will just be pushing Enter like kalashnikov for the export after a while. Especially the alert warning about overwritting a file gets hidden like this very easily.

Pretty much all the time Pepe is using the preset defaults on all the alerts and they slow down the process even on a fast machine.

  • Pepe can easily be out of sync between the XCF and PNG, since he needs to do the export manually.

Suggested Solutions

There are two solutions that I came up with. They are not exclusive.

Minor Fixes to the export process

How to make the export be less of a pain when done repeatedly? What does GIMP need to know for export?

  • Export options (”Flattening” and “Saving as animation”)
  • Advanced format-related functions like interlacing, offsets, background color...

After some discussion with Sven Neumann, having the export options together with format options isn’t feasible to have in the file save dialog. So what I propose is a special dialog to export (save a copy).

FIXME: Technical note - As it stands it’s not possible to query the output plugin for options, needs API change.

Save a copy wouldn’t bring up the save dialog, but a parent dialog that contains both the output directory widget (that launches the file selection dialog) and the export + file format options. The export process would look like this:

First use of save a copy

GIMP needs to somehow remeber a copy has been saved for the XCF file. If such information was saved as a parasite onto the image, it would be possible to change the output directory for save a copy to be different from the location of the XCF and no need to make the user browse to it.

  1. Bring up save as copy (File>Save a Copy>as New)
  2. Pepe needs to select the output file using the File: [ ] [ browse ] widget. This may/may not involve using the file selector.
  3. After the filename is selected, the export options grouped in the disclosure tiangle are populated with options relating to the output format.
  4. Pepe alters the default options for the file format to have flatten image, no interlacing, do no save bcg color, do not save gamma, do not save layer offset, save resolution, save creation time, save comment, save color values for transparent pixels and comrpession level of 9 and presses the [save] button.

A successful export will now show up as a new item in the File>Save a Copy>foo.png. This information of succesful exports is saved in the xcf so it’s possible to save a copy by simply selecting the filename from the Save a Copy list.

Consequent runs of save a copy

  1. Bring up save as copy>foo.png

Automagic Export

Under Image>Properties there’d be an Auto-Export tab with only a few widgets:

  • Enable Atomatic Export checkbox
  • Output directory widget
  • Export Background Layer checkbox

With this feature enabled, every time one would save the xcf, a copy with the above properties would be saved as well. It would save Pepe about 30% of the day.

FIXME: multiple exports per XCF.

Open Questions

  • Save and Save as really only make sense for XCFs. Why not simplify the save dialog for that task (no file format selection)?
  • In GIMP 2.2 it is possible to by-pass some dialogs by clicking shift while pressing a button (new layer). Does gtk+ allow to pass info whether a menuitem was selected while a modifier was pressed? That would make “use default settings” ultimately cool and consistent with the behaviour for save a copy and applying various filters too.
 
gimp/png_export.txt · Last modified: 2006/09/19 15:10