- 17,102
- United Kingdom
Hi,
this might be an odd question.
Is it known how big a node is, say in inkscape.
So for instance my current image is at 18kb. then if i/we knew the size of a node then it would just be deleting x more nodes, and i get to 15kb.
Or isn't it that simple.
Broadly it is that simple, though there are other factors. In terms of nodes it depends on your accuracy. Each character in the SVG file is 1 byte so at the very very least it's going to be 3 bytes...
SVG's can be opened as text files in notepad, or similar;
In the above example something like -0.247214,-1.48906 represents one node and is 18 characters, so that's 18 bytes. Nodes on curves may also contain an extra character.
If you have 1000 nodes, each at 18 bytes, lets say you end up with an 18kb file (broadly speaking). You could then delete ~160 nodes to get it to the right size, or if you reduced the accuracy of each node, by 1 decimal place, you'd be down to 16kb, then you'd only have to delete ~50-60 nodes. In practice the accuracy of the above example is way more than is needed.
The point is file size equates mostly to Number of nodes × number of numbers in the node. You have to allow for other stuff (fill data etc.) so it's not exactly that straight forward, but it's close enough.
Hope that helps.