
Terry Hancock wrote:
Hi, Although getting an SVG slice program to run from Inkscape is an interesting project in itself (I'm starting work on a plugin myself, so I'm quite interested in prior examples), I didn't see anybody mention the "really dumb and obvious" way to do this in Inkscape, so I thought maybe I should post ...
Create a series of background rectangles behind your drawing, representing the "slices" you want -- you'll note there's no need for them to conform to an even grid, unless that's what you want, but doing so is trivial with grid, duplicate, and/or snap-to-object settings.
Set each of those objects to white fill with no border.
Then select each and export "selection" to PNG files.
The bounding box of the rectangle will define the limits of the resulting PNG files, and you will see a series of "slices" of your drawing, which is, I think, what you wanted.
I can appreciate that this might not be quite as automated as you were hoping for, although it may be more customizable (I haven't tried SVGSlice, so I can't say for sure).
I also have to point out that there are a zillion ways to do this (starting with ImageMagick's "crop") on the bitmap output. And given that this kind of application is strictly tied to the limitations of the bitmap output (e.g. you are dimensioning in "pixels"), why would you want to mess with doing it in the original drawing?
Cheers, Terry
Hey, thanks for your point of view. Right now i'm slicing output images in imageMagick (crop functions) or in Gimp, but I asked about the script to make it more automatic... I was using your method previously (to be exact: i created a box covering the slice / field i want to export, selected that box, then go to export dialog, switched to "export selection", then switch to "custom export" which remembers the export settings (X and Y, width and height). Then, without closing export dialog, i went back to the image, deleted the box - got back to export dialog (with custom still switched on) and hit "GO".
But this method isn't working well with edges (sometimes Inkscape gives transparent egdes of that slice) and isn't helping with webgraphics - where you got one banner and want to slice it into 5 pieces, easy and quickly... and that's why i'm very interested in this slicing plugin :)
regards, #9