I was creating a splashpage for an app I'm working on at work, using my personal laptop with Ubuntu (14.04) and Inkscape. We use a framework at work that requires precise dimensions, but I could not initially find those dimensions so I figured svg's would be ideal for me to keep my image in (as opposed to using GIMP.) I would export to a png with a specific size as I iteratively got closer to what I wanted.
I was using known working png's as a dimensional guide, and when viewed in MS Paint and Windows Photo Viewer, both the examples and my png looked exactly the same size and had the same properties, in both dimensions and DPI (as given by Paint).
However, when I opened my png with the app, my image would consistently pixelate and uglify, and be expanded some percentage (probably less than 10%) beyond the visible borders of the canvas.
After enough digging through the code, I found the specific dimensions (which one of my examples also had), defined in xaml, I think specifically denoted as
but I do not know much about xaml, except that it appears to be an xml.
I set my image to that specific size, but I still had the pixelation problem. Then I noticed that I was exporting at 90 DPI (dots per inch) but that Paint said I was at 96 DPI. I first tried adjusting my export DPI, but then my dimensions would grow larger. Sensing the problem was in the png metadata, I then tried to specify it on the command line with
inkscape image.svg -e image.png -d 96 -C -wXXX -hXXX
which should let me specify both width and height in pixels as well as the DPI. But that didn't work.
I finally managed a workaround by setting my SVG in a lower dimension that, when I expanded from 90 to 96 DPI on export, expanded the dimensions to that precisely required in the xaml.
My question is, was my workaround actually the right way to do this, is there some kind of bug in Inkscape that caused me to have to do this, is it that the metadata is somehow mispecified, or is it that the xaml is using (perhaps deprecated) metadata that the other applications in Windows ignored?