Bug 727854 - Export file type should not be based on filename extension

Keep the export proc acound in the image (just as we keep around
the save proc), and use it when exporting again.

(cherry picked from commit 3dbae5e4d97139b7917c229671fe90963ab7d0e6)