Hi.
I use inkscape to draw icons to web pages. I use the export-dialog to create the final png files.
I would like to export multi area using only ones the export-dialog, It is enough to add two new parameters to sp_export_png_file: repeat_x, repeat_y.
Then in export.cpp make this loop (pseudo-code): for( i=0; i< repeat_x; i++) { for( j=0; j< repeat_y; j++) { if (!sp_export_png_file (sp_desktop_document (SP_ACTIVE_DESKTOP), filename + "_x" + i + "_y" +j, x0+i*width, y0+j*height, x1+i*width, y1+j*height, width, height, xdpi, ydpi, nv->pagecolor, sp_export_progress_callback, base)) } }
Another possibility is to add access to sp_export_png_file from the extension API.
Thanks. Pawel Szklarz.
On 6/25/07, Pawel Cesar Sanjuan Szklarz <paweld2@...155...> wrote:
Hi.
I use inkscape to draw icons to web pages. I use the export-dialog to create the final png files.
I would like to export multi area using only ones the export-dialog,
You can already do this in SVN version:
* 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.
super!!!
Thank you!!!
Dnia 25-06-2007, pon o godzinie 11:00 -0400, bulia byak napisał(a):
On 6/25/07, Pawel Cesar Sanjuan Szklarz <paweld2@...155...> wrote:
Hi.
I use inkscape to draw icons to web pages. I use the export-dialog to create the final png files.
I would like to export multi area using only ones the export-dialog,
You can already do this in SVN version:
* 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.
participants (3)
-
bulia byak
-
Pawel Cesar Sanjuan Szklarz
-
Paweł Cesar Sanjuan Szklarz