ths1104 geeké

How to import .png in Inkscape without changing its size

Posted in Inkscape by ths1104 on January 8, 2014

Apparently there is no way of doing that directly…

There is a limitation in the way Inkscape imports raster/bitmap images (e.g JPEG, PNG, TIFF images): it cannot read the image resolution. Inkscape assumes a 1-to-1 relation at 90dpi, so any imported image with a different resolution will appear to be scaled. For example, an image of resolution 180 dpi, when imported into Inkscape, will appear twice as big (180 = 90 x 2) in absolute units as it is in other programs. Note that this just scales the pixels of the image, but never adds or removes any pixels.

When exporting back to a PNG image, changing the resolution will only resample the image, not resize it. The only way to keep the image at the same size is to scale it inside Inkscape, once it is imported. For this you need to know the size (in pixels, cm, inches,…) of the image you import. Then select it and in the selector’s toolbar, click the lock between the width and height fields, select the unit of the image size and enter either the width or height in the appropriate field. When exporting, if you don’t want to lose information from your image, use a resolution larger or equal to the resolution of the original image.

Example: Import an image of size 800*600 pixels and resolution 150 dpi. It will appear to be 1333 pixels wide and 1000 pixels high in Inkscape. Select it, click the lock in the selector’s toolbar, enter 800 in the width field. Add some stuff on the image. Export the document to PNG with resolution 150 dpi. The exported image will be identical to the original one except for the stuff you added on it.


Inkscape with LaTeX

Posted in Inkscape, LaTeX, Visio by ths1104 on July 23, 2013

Windows 7 (64 bits)

You can write and edit LaTeX equations directly in Inkscape with Textext extension. The last version of Inkscape needs some modifications to be compatible with the last version of Textext [1]. You can find a package that includes theses modifications, but you still need to install several prerequisite packages [2,4]. Therefore I recommend the full portable version bellow [3].

Inkscape 0.48 + Textext 0.4.3 full portable version : download (Windows 7  – 64 bits).
Inkscape 0.91 + Textext ?.?.? full portable version : download (Windows 7  – 64 bits). For this version, copy the preamble in .\share\inkscape\extensions\ relative to the main folder.

How to use: tutorial.


[3] Installing Inkscape with TeXtext on Windows 7

[Oct 31, 2016] – Added link to portable Inkscape 0.91 + Textext

%d bloggers like this: