Inkscape Forum Inkscape > multiple png export

Posted by Pawel Cesar Sanjuan Szklarz (Guest)
on 25.06.2007 11:44
(Received via mailing list)
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.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
Posted by bulia byak (Guest)
on 25.06.2007 17:01
(Received via mailing list)
On 6/25/07, Pawel Cesar Sanjuan Szklarz <paweld2@gmail.com> 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.

--
bulia byak
Inkscape. Draw Freely.
http://www.inkscape.org

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
Posted by Paweł Cesar Sanjuan Szklarz (Guest)
on 25.06.2007 17:11
(Received via mailing list)
super!!!

Thank you!!!

Dnia 25-06-2007, pon o godzinie 11:00 -0400, bulia byak napisał(a):
>     *  Batch export: The Bitmap Export dialog (Ctrl+Shift+E) got a new
>     This makes it possible to implement all kinds of image slicing and
> export selected objects checkbox on.
> 


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/