Is there a tool or extension to change the resolution of all embedded jpegs, pngs and what have you in an svg ?
I could use it as a command or verb to batch process a bunch of svgs with embedded images so all their contained images would scale down to e.g. 300 dpi and make my svgs much smaller.
I can't just de-embed and resize with imagemagick because once put outside of the svg, there is no way to know what 300 dpi means anymore.
Also, I'm mostly looking for a tool that uses a good jpeg compression (like imagemagick).
I don't think you can change the resolution of an embed image; if you do not find anything useful into the default extensions hence you can take a look here: https://inkscape.org/gallery/=extension/
@TylerDurden I don't see what this has to do with my issue. I don't need to embed images, they're already embedded. I need to change their resolution from inside Inkscape so that I can use a dpi value based on the page size, which is impossible to do non-manually from outside inkscape or outside a pdf version of the document.
Currently the only way I found to achieve this is to use Ghostscript on the exported pdfs but as I said the compression is very bad and does not meet que quality standards I need.
I guess I could use pngs instead, use ghostscript, then convert all the pdfs back to svgs, de-embed all the bitmaps and convert those I want to jpegs but converting to pdf and back to svg is risky and destructive for some svg features.
An Inkscape extension would be the best but I didn't find any either.
@TylerDurden awesome, that totally helped ! Thanks you ! Thanks alos to OP @Chameleon_Scales ! I could reduce pdf size more than one fourth its size ! Kind of manual but quite fast thought: I select all embedded images, press Alt+B, send them at the bottom, then select again all images now on top and delete them. I also setup default importing bitmap res lower so hopefully next ones will have that res directly.
Does this still work? Designing a tradeshow Booth backdrop that is 10 ft x 8 ft at 120 dpi, but the printer requires that I send what I've designed as a pdf where everything is between 100 to 120 dpi. Problem is my raster images are all smaller than this.
When I select an embedded image, then prest alt+B, the next step is "send them at the bottom" What is that< I can't see anything to send?
"Send them to the bottom" refers to changing the objects' z-order... a way to easily select the originals by moving the newly minted copies to the background.
Wow! I came back very unhopeful that there would be a response yet, and there were already three! Thank you @bleke, @Moini, and @TylerDurden
It turns out the shortcut wasn't working for me either, but the menu did the trick. However shift + ctrl + P worked great to open up preferences, then I went down and selected "Imported Images" within preferences, then changed "Resolution for Create Bitmap copy" to 120 dpi.
I'm going to send off the new backdrop to the printer. They are closed now, but if you don't hear from me... It worked.
Hi,
Is there a tool or extension to change the resolution of all embedded jpegs, pngs and what have you in an svg ?
I could use it as a command or verb to batch process a bunch of svgs with embedded images so all their contained images would scale down to e.g. 300 dpi and make my svgs much smaller.
I can't just de-embed and resize with imagemagick because once put outside of the svg, there is no way to know what 300 dpi means anymore.
Also, I'm mostly looking for a tool that uses a good jpeg compression (like imagemagick).
I don't think you can change the resolution of an embed image; if you do not find anything useful into the default extensions hence you can take a look here: https://inkscape.org/gallery/=extension/
Yep, you'd need to write or find an extension for that. I don't know of any extension that does that, but they might exist.
Select image, Alt-B, delete original? How many images are we discussing?
Thanks everyone for your help.
@TylerDurden I don't see what this has to do with my issue. I don't need to embed images, they're already embedded. I need to change their resolution from inside Inkscape so that I can use a dpi value based on the page size, which is impossible to do non-manually from outside inkscape or outside a pdf version of the document.
Currently the only way I found to achieve this is to use Ghostscript on the exported pdfs but as I said the compression is very bad and does not meet que quality standards I need.
I guess I could use pngs instead, use ghostscript, then convert all the pdfs back to svgs, de-embed all the bitmaps and convert those I want to jpegs but converting to pdf and back to svg is risky and destructive for some svg features.
An Inkscape extension would be the best but I didn't find any either.
Alt+B makes a bitmap copy within Inkscape at a specified DPI. The DPI is set in Preferencs.
@TylerDurden great advice!
@TylerDurden ( ྃ Д ྃ ) oooh, I have to check that out then. Thank you.
@TylerDurden awesome, that totally helped ! Thanks you ! Thanks alos to OP @Chameleon_Scales !
I could reduce pdf size more than one fourth its size ! Kind of manual but quite fast thought: I select all embedded images, press Alt+B, send them at the bottom, then select again all images now on top and delete them.
I also setup default importing bitmap res lower so hopefully next ones will have that res directly.
Does this still work? Designing a tradeshow Booth backdrop that is 10 ft x 8 ft at 120 dpi, but the printer requires that I send what I've designed as a pdf where everything is between 100 to 120 dpi. Problem is my raster images are all smaller than this.
When I select an embedded image, then prest alt+B, the next step is "send them at the bottom" What is that< I can't see anything to send?
"Send them to the bottom" refers to changing the objects' z-order... a way to easily select the originals by moving the newly minted copies to the background.
'End' key. Or the corresponding button for this in the selection tool's tool controls.
The shortcut doesn't work for me, but in the menu it works: Edit -> Make a Bitmap Copy
It won't make your images have a higher resolution though. For that your best option probably is Path -> Trace Bitmap.
You can raise/lower the dpi of the bitmap copy... it just won't make the image look any better.
Wow! I came back very unhopeful that there would be a response yet, and there were already three! Thank you @bleke, @Moini, and @TylerDurden
It turns out the shortcut wasn't working for me either, but the menu did the trick. However shift + ctrl + P worked great to open up preferences, then I went down and selected "Imported Images" within preferences, then changed "Resolution for Create Bitmap copy" to 120 dpi.
I'm going to send off the new backdrop to the printer. They are closed now, but if you don't hear from me... It worked.
thank you again