NEW: batch export and slicing

* Batch export: The Bitmap Export dialog (Ctrl+Shift+E) got a new checkbox, Batch export all selected objects. This checkbox is available when two or more objects are selected. If it is checked, instead of exporting selection as a whole, Inkscape exports each selected object separately into its own PNG file. This uses each object's export hints (i.e. export filename and DPI) if they are remembered from a previous export; otherwise, the filename is created from the object ID and the DPI is 90 pixels per inch. Caution: Unlike regular export, batch export overwrites all existing PNG files without warning.
This makes it possible to implement all kinds of image slicing and automated export scenarios. For example, if you are working on a web site design, you can create a separate "export" layer. In that layer, "slice" your web page image into separate areas by creating invisible rectangles with no fill and no stroke. Select each rectangle (by Tab/Shift+Tab, or by switching to Outline mode where even an invisible rectangle can be selected by clicking on its outline) and export it into the corresponding filename (which gets saved as that object's export hint). After that, if you do any changes to your graphics, it's very easy to reexport all the slices: just switch to the "export" layer, select all in that layer (Ctrl+A), and export with the Batch export selected objects checkbox on.
This functionality replaces the "groups to pngs" extension which I'm going to remove. If you know of any reason why it should stay, please speak up.

I would like to apologize because i did not finish this batch export that i began through the G2png script. LGM takes too much time these weeks.
Bulia, have you implemented it in Python or C++ (what would be the file then that icould have a look and learn) ?
pygmee

On Mon, 2007-02-12 at 01:38 -0400, bulia byak wrote:
Caution: Unlike regular export, batch export overwrites all existing PNG files without warning.
Do you consider this a bug or a feature? I believe that we should at least give a warning before overwriting files. I'm saying "write it" as much as, would you be opposed to a warning?
--Ted

On 2/13/07, Ted Gould <ted@...11...> wrote:
Do you consider this a bug or a feature?
Rather the latter. When you're exporting 20 files and have to click "yes" 20 times, it's a worse bug imho :)
Of course ideally it should be a single dialog with a "Yes to all" button, but I couldn't do it easily, because the dialog is shown by the export function which is called for each file and is unaware about other exports to follow. Any ideas how to fix this?

On Tue, 2007-02-13 at 03:32 -0400, bulia byak wrote:
On 2/13/07, Ted Gould <ted@...11...> wrote:
Do you consider this a bug or a feature?
Rather the latter. When you're exporting 20 files and have to click "yes" 20 times, it's a worse bug imho :)
Of course ideally it should be a single dialog with a "Yes to all" button, but I couldn't do it easily, because the dialog is shown by the export function which is called for each file and is unaware about other exports to follow. Any ideas how to fix this?
Yes, I agree that it should be one dialog. But, I think we should have that one.
I was thinking we'll probably just have to do it in a couple of passes. Not using the current dialog at all, just reimplementing that section of the code with a different path for determining which files will be overwritten.
I'll put it on my todo list, but with all the hacking you've been doing recently you'll probably have it done before I look at it ;)
--Ted
participants (3)
-
bulia byak
-
cedric GEMY
-
Ted Gould