3

Is it possible to "optimize" a bitmap image I've imported into an Inkscape document, resizing it so it's stored at the document's resolution?

For example, if I import a 900px square image then resize it down to 1in, can I ask Inkscape to to re-render that image at 300 DPI so the image saved in the file is only 300px wide?

My goal is to reduce the size of the SVG file while still embedding the bitmaps.

  • Hi David, what are you doing with the SVGs at the end of your workflow? It's a somewhat strange request so I assume you've got a good reason for a) wanting to do this and b) restricting yourself to Inkscape/SVG – Matt Bracewell May 12 '15 at 14:28
  • My workflow is: 1) designer creates SVG with Inkscape, 2) SVG is imported into my software, 3) my software uses that SVG to generate PDFs, 4) end-users print those PDFs. So it would be possible to resize the images in the SVG in my software (ie, since the destination is print, so DPIs over 300 don't make sense), but if there was a simple "optimize images" option, that would be the simplest. – David Wolever May 12 '15 at 15:30
  • I haven't done the tests but I'd have thought that Inkscape's "Resolution for rasterisation (dpi)" option in the Save as pdf dialogue will give you optimised pdfs. As your "optimise images" option doesn't exist (yet?) would that do for now? – Matt Bracewell May 12 '15 at 15:37
  • Unfortunately Inkscape's Save as PDF doesn't help because my software transforms the SVG before rasterizing (and it doesn't use Inkscape to rasterize), and there is metadata embedded in the SVG which would be lost if i exported to PDF, then imported the PDF and re-saved as SVG. – David Wolever May 12 '15 at 15:40
  • 1
    Right. In which case, I can't help except to suggest optimising the bitmap before it gets to the svg. – Matt Bracewell May 12 '15 at 15:42
2

Choose Edit > Make a Bitmap Copy to create a rasterised image with the same resolution as the document. This works equally good with vector graphics and imported bitmap images. Since bitmaps are uncompressed your SVG would probably increase in size, but with some luck your pdf export will take care of that for you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.