* Convert SVG to PNG
Today I was going to pick-up an order and to my dissapointment the store sent me a QR-code that I needed to bring for them to hand out my order. Usually you get a simple code. For most people this is not a problem tho, but I have started to use a dumbphone. So, then I have to bring my smartphone (which has no internet access on the go) with the QR as an image. An important details is that the image was in SVG format. To my surprise my smartphone (a Pixel 8a) does not support displaying SVG images locally, so I had to convert it to PNG.
My first go-to is ImageMagick which is a powerfull image converter/manipulator tool. The problem with ImageMagic was that when I wanted to scale the image to a larger size than the original SVG (300x300), it got all blurry. I needed a larger size because the 300x300 image got blurry on my phone. I wanted it to be atleast 1024x1024.
I went looking for alternatives and found this StackOverflow answer which suggest using inkscape
. The command suggested worked perfectly. My image got as clear as it could be.
inkscape -w 1024 -h 1024 input.svg -o output.png
The power of Inkscape continues to amaze me!