Inkscape.org
Beyond the Basics Import Image Size Bug?
  1. #1
    Paddy_CAD Paddy_CAD @Paddy_CAD
    *

    Arising out of another forum question, I did some testing and maybe found a bug.

    https://inkscape.org/forums/beyond/smaller-image-size/

    I have a digital camera picture which Gimp correctly sees as 300dpi. When I import the same picture to Inkscape it is treated as 72dpi and so appears much larger than expected. This might be a MacOS issue because Preview also reports 72dpi.

    Does Inkscape retrieve this metadata from a jpeg image file? Or does it rely on the operating system to do so? Are there any workarounds to correct this?

  2. #2
    Polygon Polygon @Polygon🌶

    You're mixing "ppi" and "dpi".

  3. #3
    Paddy_CAD Paddy_CAD @Paddy_CAD

    Am I? In most scenarios dpi and ppi are interchangeable. Maybe I should call them JPEG Colour Tiles Per Inch (jctpi). 

    The question remains. Gimp says my photo is 10.9 inches wide and Inkscape says 45.3 inches. I agree with Gimp. What is Inkscape doing?

  4. #4
    Tyler Durden Tyler Durden @TylerDurden

    The status bar indicates the correct image size in pixels here. The image is scaled 33% upon import using default import settings.

    Irfanview reports the image is 72dpi/ppi, so it seems Inkscape is scaling up the size to 96.

     

    Inkscape
    I View64 20230315
    Img 20230106 111610901
  5. #5
    Paddy_CAD Paddy_CAD @Paddy_CAD

    I've done some more trials with more pictures and now I must back-pedal completely. The problem seems to be with Gimp (v2.10 MacOS). Every picture I open shows a pixel density of 300ppi, regardless of the values reported by Preview and XnView MP. It seems to convert the jpeg to the internal XCF format, ignoring the EXIF DPI value and applying a default value. As far as I can tell, all other EXIF data is retained.

    Crisis averted. Sorry I doubted you, Inkscape.

  6. #6
    Tyler Durden Tyler Durden @TylerDurden
    *

    Weird. Gimp 2.10 under Windows reports 72 dpi for my test image.

    Edit: same under Linux Mint.

  7. #7
    Aero Aero @Aero◻️

    You may get different results depending on Inkscape version.
    Here 1.2.1 vs Dev.

    Screenshot 31
  8. #8
    Paddy_CAD Paddy_CAD @Paddy_CAD

    Just to add to the weirdness. Gimp, Inkscape, Preview & XnViewMP all agree that Tyler's test image size is 1600x900@72dpi. I'm ending my investigation here for now.