Allow cropping SVG files. Resulting file is also an SVG.
This doesn't actually remove any image data, just change what part of the image is shown. Rotation is not supported.
Fixes #89
When I started working on this, I didn't notice there was a WIP svg branch. However it looks like we both had the same general idea for how to implement.
Cool, it would be really nice to have SVG support! You'r implementation looks good to me, but I'm not very familiar with SVG (which is probably also why I never completed by branch). When I tested this PR with a few random SVG files, I found one that doesn't seem to be cropped right: https://commons.wikimedia.org/wiki/File:Bisec-examples-1.svg Can you have a quick look to see if you understand why?
If I make this selection:
The preview looks like this:
Whoops, looks like I made an error in my math. I divided the numbers in the wrong order so it was multiplying by the wrong ratio. Most files the ratio between user units and actual pixels is 1:1, so it won't matter, but if that's not true then it was cropping them wrong. I added a commit to my branch to fix the error
@danmichaelo Just a friendly reminder ping :)
@danmichaelo just a friendly reminder ping.
@bawolff Sorry for the wait, I've tested the branch a bit now and it seems to work really well!
Thank you :)