png jpg image import or drag and drop wrong resolution size

Bug #1444180 reported by qubodup
6
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://youtu.be/SwFV2yIbs6Q the square 64px image in the video: Ruby Gem_4.png PNG 64x64 64x64+0+0 8-bit sRGB 10KB 0.000u 0:00.000 imports at 19.something pixels.

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.

Revision history for this message
qubodup (qubodup) wrote :
Revision history for this message
su_v (suv-lp) wrote :

Debug output enabled for the detection of the resolution on import reveals this detail:
../../src/extension/internal/image-resolution.cpp(377) readjfif: readjfif
x_: 1.000000
y_: 1.000000
../../src/extension/internal/image-resolution.cpp(381) readjfif: success

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).

tags: added: bitmap importing
Revision history for this message
qubodup (qubodup) wrote :

Ah.

To spare the confusion to people who are not experienced working with dpi and just work with pixels (I'm assuming all non-print work), it'd be prudent to set "Default import resolution" to default in the import window ( screen: http://i.imgur.com/dBbRcuI.jpg ).

Thanks for clarifying!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.