Inkscape.org
Beyond the Basics smaller image size
  1. #1
    I_Megaman_I I_Megaman_I @I_Megaman_I

    Hey

    I searched a bit and couldnt find an answer. its very important to me that I can measure in px.

    1. I have an image file: 

    2. the Imported image now has different smaller size:

    so how do I import with 1:1 ratio?

  2. #2
    Polygon Polygon @Polygon🌶
    *

    The only way I found to replicate this is to change the "Default import resolution dpi" higher than the default 96dpi at Inkscape Preferences/Imported Images - import an image and Resize to content. Hopefully this will give you a clue.

  3. #3
    Paddy_CAD Paddy_CAD @Paddy_CAD
    *

    This could get complicated.

    Inkscape uses a resolution of 96dpi for svg documents, which is a CSS and SVG standard. This was, I believe, selected to match the pixel grid of many displays of the day. Modern screens typically have higher pixels densities. For example, a 15.6” laptop with 1920 x 1080 resolution corresponds to 141 ppi (pixels per inch). Old versions of Inkscape used 92dpi 90dpi, but that's another story. 

    It's important to understand that this does not set the number of pixels in a drawing. It's more a baseline to calculate screen and print output sizes. In your case the page measures 915.52 pixels wide and 738.56 pixels high. Divide by 96dpi to yield a page size of 9.536 x 7.693 inches.

    The jpg file format describes a pixel count (5722 x 4616) and usually a pixel density, not known in this case. Assume it's 600dpi, corresponding (nearly) to a 10x8 inch picture. When you import a jpg, Inkscape displays the "jpeg bitmap image import" dialog where you specify the Image DPI: [From file] or [Default import resolution]. If the jpg does not specify a dpi value, Inkscape applies the default value.

    Image DPI: [From file]
    Inkscape calculates the image width as (5722 pixels)/(600dpi) = 9.536 in. No pixels are discarded but the image on the page will be squeezed into a box 9.536 inches wide and 7.963 inches high. Amazingly, this matches the page size calculated above. Of course it does: When you opened the jpg, Inkscape created a page to enclose it.

    Image DPI: [Default import resolution].
    Inkscape ignores the jpg dpi and looks to [Preferences > Imported Images > Default import resolution: XX dpi]. Normally this is set to 96dpi to match Inkscape's internal pixel size. The resulting image size will be (5722 wide, 4616 high)/(96dpi) = 59.604 x 48.083 in. Too big, unless you're designing billboard posters.

  4. #4
    I_Megaman_I I_Megaman_I @I_Megaman_I

    nevermind, I`d rather use photoshop, because this stupid lol

  5. #5
    Polygon Polygon @Polygon🌶
    *

    @Paddy_CAD  no matter what I do; dragging onto open Inkscape or import image it stays in original pixel size. Display size is another option/thing. Just as per above steps taken the px-size will be altered. Why making simple things complicated?

    Could be user don´t know the difference between raster- and vector graphic due he mentioned PS.

  6. #6
    Gremlin King Gremlin King @Gremlin_King

    i have the same problem. thank you comment section

  7. #7
    CW-Abbott CW-Abbott @CW-Abbott

    Hello community.

    My issue is related and I have read through this post with a rough understanding, but still wondering if there is a workaround to getting a difference in document / canvas size VS the actual pixel dimensions of an image?

    I made a banner in Gimp which is 1312x300 pixels at 300dpi.
    When I open that image in InkScape, it says my image size and dpi are what they saved at, but my file dimensions within inkscape are much less pixels - and now I cannot make the same guides as in my Gimp file, since there are no longer 1312 pixels to work with horizontally? I did tell it to use the resolution of the image, but I have also changed my preferences to be 300dpi.

    Is there no way to just open the image and have it be the exact same dimensions in the document properties and dpi as the original?

     

    Inkscape Size Properties
  8. #8
    Paddy_CAD Paddy_CAD @Paddy_CAD
    *

    Gimp creates images from pixels, coloured tiles laid out in a square grid. Together, pixel size and pixel count determine the overall image size. Inkscape is different. It's a vector editing application where images are made from mathematical functions plotted on a geometric plane.

    By analogy to physical real-life painting, this infinite plane is a "canvas" and you can draw anywhere on it. A "page" is what you will print, or mount in a frame, or display in a web page. It's a rectangle stretching from (0,0) at the top left corner to an (x,y) coordinate at the bottom right.

    Coordinates on the svg plane have no specific length, or more accurately, you can assign them any length that suits your needs. Normally your operating system tells Inkscape the size of your display pixels and then at 100% zoom level, 100 svg units in your drawing will match 100 pixels on your screen. Knowing the size of a pixel, you can also specify lengths in real units like mm or inch or pt.

    Since scaling is arbitrary, how should imported pixels be handled? Your jpg file usually includes resolution (dpi) as well as pixel count (width x height). Inkscape uses these to calculate an appropriate rectangle size according to your display. If there's no resolution given, 96 dpi is assumed. The imported jpg is not resampled. Every pixel is preserved regardless of how you squeeze or stretch or rotate the image on your page.

    When you print your drawing or export a bitmap, Inkscape translates vector image data to any image size and any pixel density that you specify. This will resample your jpg.

    I'm not sure if this clarifies or confuses. Let me know.