Hi, Mr. Byak.
I know that, for a vector image, the width and height in pixels is meaninless. It is built with a series of PNG images and text objects. About 2900 in each file. I have to slice every file in 29,232 parts. Each part will have 180px width and 150px height. Also, every part must be named with their source X and Y coordinates.
The source SVG is not too big, in bytes. It has about 20 MB because of the series of PNG imagens on it. It dosn't have any efect like blur or other, transparency or other thing. Well, the background color for the page is nothing, if this means something.
Maybe I did something wrong in the batch script. It is so simple. Maybe I can't see something obvius.
--------------------------------------------------------------------------------
for /l %%Y in (0,150,37650) do ( for /l %%X in (0,180,20700) do ( call :export_file %%Y %%X ) ) goto :EOF
rem %1 is Y coord. %2 is X coord. :export_file
set /a RIGHT=%2 + 180 set /a TOP=%1 + 150 inkscape -e ../target-dir/%2x%1.png -a %2:%1:%RIGHT%:%TOP% source.svg goto :EOF --------------------------------------------------------------------------------
I can see that a problem in this script is that every time it calls a new instance of Inkscape. This is a problem. I read about the '--shell' command line option but seams to me that it is not working. So, I had no alternatives. There is something else that can be done?
Thanks, Alessandro Antonello
-------------------------------------------------- From: "bulia byak" <buliabyak@...400...> Sent: Thursday, December 04, 2008 2:46 PM To: "Alessandro Antonello" <aleantonello@...19...> Cc: inkscape-devel@lists.sourceforge.net Subject: Re: [Inkscape-devel] Script to export images
On Thu, Dec 4, 2008 at 12:31 PM, Alessandro Antonello <aleantonello@...19...> wrote:
Hi, All.
I already wrote this question in the inkscape-user list but no one came to me with a good solution. My problem is that I have a SVG image too big. In fact is more than one. They are five SVG files with size of 20880 pixels width by 37800 pixels height. I have to export PNG files of slices that must have 180 pixels width by 150 pixels height.
This is rather meaningless measure of bigness for vector images :) How many objects? Nodes? Bytes in SVG? Does it use blur (most important!), transparency, gradients?
batch file (I am using Windows XP with Inkscape 0.46) but it is too slow. I left it running almost 16 hours strait and it didn't finished the first file yet.
Looks like it has blur or other filters. In that case, you would need to download the latest dev build, it is much faster than 0.46 in exporting blur.
-- bulia byak Inkscape. Draw Freely. http://www.inkscape.org