png jpg image import or drag and drop wrong resolution size
Bug #1444180 reported by
qubodup
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
New
|
Undecided
|
Unassigned |
Bug Description
Hello and thanks for Inkscape!
When importing a png or jpg image either by `inkscape file.png` or using the import button, the imported image has incorrect size http://
When importing a jpg (test.jpg JPEG 654x380 654x380+0+0 8-bit sRGB 30.4KB 0.000u 0:00.000) it imports as 58860.000 x 34200.000 px. test Image attached.
Arch Linux 64bit
Inkscape 0.91 r13725 (Apr 4 2015)
Removing ~/.config/inkscape doesn't solve it.
To post a comment you must log in.
Debug output enabled for the detection of the resolution on import reveals this detail: extension/ internal/ image-resolutio n.cpp(377) readjfif: readjfif extension/ internal/ image-resolutio n.cpp(381) readjfif: success
../../src/
x_: 1.000000
y_: 1.000000
../../src/
i.e. the internal resolution as read from the file is 1 pixel per inch (1ppi), which is then correctly used by Inkscape to scale the imported image on import if asked by the user to use the resolution from file.
GIMP 2.8.14 displays the same information about the resolution of the JPG image (menu 'Images > Image Properties'), as does e.g. Apple's Preview.app.
This (optional) feature to use the resolution from file on import was implemented on popular demand (see bug #165952 and duplicates). The user is prompted whether to use resolution from file, or the default one (90dpi, or as defined in the preferences).
Why or how the JPG image got saved with such a resolution is unknown (and not relevant here).