: Inkscape SVG file with many photos is over 300 Mbs Somehow I've ended up with an Inkscape SVG file of over 300 megabytes which is now impossible to open. I was doing a caricature using a
Somehow I've ended up with an Inkscape SVG file of over 300 megabytes which is now impossible to open.
I was doing a caricature using a collage of photos of each aspect of the subject's face subject (eyes, nose etc.) and drawing over the collage. It was a detailed drawing and I was creating individual hairs for the moustache, eyebrows and scalp by grouping and duplicating as appropriate (hundreds of times perhaps). It's a technique I've used successfully before with Corel Draw XIV.
All was going well and I was nearly done when Inkscape suddenly slowed down and eventually crashed. now it's reloaded but won't open the file. I had no idea the file had reached that size. What can I do?
More posts by @Kevin459
I see two questions here:
Recovering your work
Avoid such problems in the future
1.: If you go to the menu entry Edit/Preferences, "Input/Output"/Autosave-Dialog, autosave folder - there you find where the backups are stored. Maybe a previous version is still working.
Of course, if inkscape is 100 minutes open with an intervall of 10 minutes and 10 instances to store, they all end up to be the same image, so maybe you can make a copy of them quickly.
2.: If you use larger objects (bytesize, complexity, not width/height, of course) multiple times, don't copy them, but clone them. A clone needs much less space but note, that it can't be manipulated (except for rotation, size, location), only the original can and changes there will affect all your clones.
And avoid to embed bitmaps, but link them in.
And you can try the 'File/Clean up document' function.
You could use SVGO to minify the file, which you could try online here. There is an option to remove bitmap.
It probably is not so much the file size but the summed up size of included bitmap images that give you an issue in your limited RAM. Therefore you will have to clean up your SVG tp give it a manageable size.
There are some options if you can't open such a file for editing.
Terminate all programs running in parallel or even in the background to leave as much memory space as possible for Inkscape. Try a document cleanup if it was loading.
Put Inkscape in View > Display mode > Outline mode for not loading bitmaps into the memory.
Try to open a huge file in a lightweight editor which would need much less RAM than your Inkscape instance. Then search and remove objects manually.
If it was still to big, split it in several parts. There are several Windows tools for file splitting, or in Unix/Linux use the following command to split files in two parts:
split --number=2 [hugefile[prefix]]
Then open each part for manual editing.
Carry a huge file to a computer with plenty of RAM for editing.