How to export at 72 dpi without changing pixel size

Post questions on how to use or achieve an effect in Inkscape.
tenar
Posts: 5
Joined: Tue Jul 26, 2011 7:21 pm

How to export at 72 dpi without changing pixel size

Postby tenar » Tue Jul 26, 2011 7:29 pm

I have a vector drawing. According to the horizontal and vertical rulers , the drawing is 1000 px wide and 100 px tall. How to export it as png bitmap at 72 dpi?

I attempted to File->Export Bitmap, then Drawing tab. But it looks like I have only 2 options here:
1. Change the Bitmap size to Width=1000px. Then Height is automaticly set to 100px (good) and dpi is automatically set to 90dpi (bad)
2. Change dpi to 72. Then the width and height are automatically set to 800x80 (bad)

I definitely need 72 dpi (will import it to another graphic bitmap composition which is already 72 dpi) and I definitely need it 1000px wide and 100px tall.

User avatar
Xav
Posts: 1209
Joined: Fri May 08, 2009 1:18 am
Location: UK
Contact:

Re: How to export at 72 dpi without changing pixel size

Postby Xav » Tue Jul 26, 2011 11:32 pm

I'm sure someone will come along with a better and more complete explanation, but in short I would ignore the dpi setting and just export to the pixel size you need. DPI stands for "dots per inch" - but if you're working entirely in pixels, inches don't come into it.
Co-creator of The Greys and Monsters, Inked - Inkscape drawn webcomics
Web SiteFacebookTwitter

User avatar
RobA
Posts: 335
Joined: Fri Aug 10, 2007 1:22 am

Re: How to export at 72 dpi without changing pixel size

Postby RobA » Tue Jul 26, 2011 11:47 pm

You should export it at the pixel size you need (100x100) and let inkscape set the DPI then use an external program (many depending on the OS) to change the DPI

-Rob A>

tenar
Posts: 5
Joined: Tue Jul 26, 2011 7:21 pm

Re: How to export at 72 dpi without changing pixel size

Postby tenar » Wed Jul 27, 2011 1:57 am

I found a solution (no idea why it's working but it is): I set the rulers to points instead of pixels in the document properties. Then make the design as if the rulers were in pixels, i.e. 1000 units wide and 100 units high. Then in the export bitmap dialog, all is suddenly ok, i.e. the bitmap is in fact 1000px per 100px and in 72 dpi.

User avatar
prkos
Posts: 1625
Joined: Tue Nov 06, 2007 8:45 am
Location: Croatia

Re: How to export at 72 dpi without changing pixel size

Postby prkos » Wed Jul 27, 2011 3:04 am

This is a neat trick, it works because in SVG a pixel is defined as 1/90 of an inch (90 dpi), while the usual definition is 1/72 of an inch. That's how you get the desired font size in Inkscape - if you want to end up with a certain number of points for text size use a size that is 1.25 larger in Inkscape. If you need 10 pt, in Inkscape you set it to 12.5 pt.

Without the trick you need to use a little math to set the page size, use the 1.25 factor again - set the page to 1250x125 pixels so when you go to export with 72dpi the image size will be 1000x100.
just hand over the chocolate and nobody gets hurt

Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download

tenar
Posts: 5
Joined: Tue Jul 26, 2011 7:21 pm

Re: How to export at 72 dpi without changing pixel size

Postby tenar » Wed Jul 27, 2011 4:06 pm

prkos wrote:in SVG a pixel is defined as 1/90 of an inch (90 dpi), while the usual definition is 1/72 of an inch
This explains a lot here
prkos wrote:if you want to end up with a certain number of points for text size use a size that is 1.25 larger in Inkscape
Thanks for the tip, I will surely have some type later :)

tresf
Posts: 5
Joined: Fri Mar 18, 2016 1:52 am

Re: How to export at 72 dpi without changing pixel size

Postby tresf » Fri Mar 18, 2016 7:00 am

You should export it at the pixel size you need (100x100) and let inkscape set the DPI then use an external program (many depending on the OS) to change the DPI


Why not allow the user to choose the DPI AND the resolution? There must be some reasoning behind this, because when working with dozens of graphics, this can become quite a large pain point.


Return to “Help with using Inkscape”