Looks like it's due to r12583 (http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/12583).
image.density() doesn't use the same unit depending on the file type (px/cm for PNG and px/in for other formats). Alvin, do you remember why you removed the test on the file type?
The attached patch should fix the issue.
Looks like it's due to r12583 (http:// bazaar. launchpad. net/~inkscape. dev/inkscape/ trunk/revision/ 12583).
image.density() doesn't use the same unit depending on the file type (px/cm for PNG and px/in for other formats). Alvin, do you remember why you removed the test on the file type?
The attached patch should fix the issue.