Width and Height vs DPI (Or PPI)

Post questions on how to use or achieve an effect in Inkscape.
Braznyc
Posts: 14
Joined: Sun Nov 16, 2014 11:10 pm

Width and Height vs DPI (Or PPI)

Postby Braznyc » Sun Dec 13, 2015 11:04 pm

It's a little confusing.
In Gimp you change those numbers without changing the other.

Gimp
Example: 4500 x 5400 at 72 PPI, 96 PPI, 100 PPI etc.


On Inkscape if your image is the same 4500 x 5400 you cannot change the DPI that the size of the image will be changed too.


Is there any workaround that make it possible to have an image of 4500 x 5400 with DPI of 100, 300 etc when exported as a png file?

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Width and Height vs DPI (Or PPI)

Postby Lazur » Sun Dec 13, 2015 11:14 pm

Hi.

Inkscape doesn't embed the resolution value to an exported image, so the short answer is no as per se, it doesn't works that way.
At the exporting you can define a certain px size for the output, or a resolution in which the drawing will be exported at to pixels.
In addition inkscape currently works @90 dpi, so if you export at it you will get the same px size as on the screen at 100% zooming.
(In the future it will change to 96 dpi later, due to following javascript.)

Braznyc
Posts: 14
Joined: Sun Nov 16, 2014 11:10 pm

Re: Width and Height vs DPI (Or PPI)

Postby Braznyc » Sun Dec 13, 2015 11:38 pm

Thanks for the answer!


As an example If I need a 4500 x 5400 with 300 dpi can I do the following:


Multiply the dpi for 3.125 that will create a 14062.5 x 16875 at 300 dpi. I save it as a png, then I open it in Gimp and change the size to 4500 x 5400 keeping the dpi (ppi in Gimp) as 300?

The final number will be 4500 x 5400 (300 ppi).


Does it make sense?

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Width and Height vs DPI (Or PPI)

Postby brynn » Sun Dec 13, 2015 11:45 pm

Oops, you posted while I was writing.

That makes sense. But do you notice that it improves the image?

Because vector graphics are generally very sharp and clear, no matter how you scale them, there's no need create a situation where more DPIs are crowded into a smaller space, as a way of improving the quality of the image.

At least that's my understanding for vector images..

PNGs exported directly from Inkscape also share that very sharp and clear appearance, as long as you don't scale the PNG afterwards. But it's true, you can't change the DPI without changing the dimensions of the exported PNG, in Inkscape. If you want to do that, you'd have to use GIMP or other raster editor. But I don't think it would improve the image much.

Braznyc
Posts: 14
Joined: Sun Nov 16, 2014 11:10 pm

Re: Width and Height vs DPI (Or PPI)

Postby Braznyc » Sun Dec 13, 2015 11:48 pm

I didn't do it yet, because I need a faster computer to try it.

But in that case I'm going to "shrink" the image instead of expanding it. So I think it wouldn't create a lot of distortion on the image.

Braznyc
Posts: 14
Joined: Sun Nov 16, 2014 11:10 pm

Re: Width and Height vs DPI (Or PPI)

Postby Braznyc » Sun Dec 13, 2015 11:51 pm

Maybe it is something technical about vectors that don't allow us to change the dpi without changing the size of the image.

How does it work on Adobe Illustrator?

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Width and Height vs DPI (Or PPI)

Postby Lazur » Mon Dec 14, 2015 12:07 am

Keep in mind dpi doesn't make sence unless you print your image.

It defines a resolution, pixels or dots per inch, "virtual" fragments over a physical scale.
Regular screen displays are usually at around a 90 dpi, and, if you are not using an old cathode ray tube based monitor you cannot change the resolution. Only display one pixels as four pixels or similar, if anything at all.

So what do you have? A set number of pixels for any raster image.
In vectors pixel size shouldn't be a thing, as in the output you can display/print/cut/engrave the exact size in real world units.

Then what's the dpi setting has to do in gimp?
Haven't tested it myself but I'm assuming that a fixed px size and a dpi defined separately can indicate the printer how large to print the image.
Which depend on the printer and on the software/application you use for printing.
For example a 4500 px wide image won't get more data to deal with to make it for a "finer" quality, it should just print in a smaller size if the resolution is set to 1200 dpi from 90 dpi. It will be just more dense.
(Theoretically, as, printers have a set size of inkblots too, with a native resolution you cannot change, so it's up to the printers rip to add the extra pixels to a "90 dpi" image, as regular inkjets print at like 600 dpi.)


Illustrator may have that feature of embedding the resolution value, not sure.
It depends on the printer.

All in all, if you are concerned about the output size, create a pdf with the right size in real world units and use that for printing -then you can print actual size after.

v1nce
Posts: 696
Joined: Wed Jan 13, 2010 4:36 am

Re: Width and Height vs DPI (Or PPI)

Postby v1nce » Mon Dec 14, 2015 5:10 am


User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Width and Height vs DPI (Or PPI)

Postby brynn » Mon Dec 14, 2015 5:29 am

Braznyc wrote:Maybe it is something technical about vectors that don't allow us to change the dpi without changing the size of the image.

How does it work on Adobe Illustrator?


I don't know how it works in AI. But it's my understanding AI can create and edit both raster and vector content. Inkscape can only create vector content. It can create PNGs by export, but it cannot edit raster images, except for a very few minor exceptions.

Raster ("bitmap") graphics/images and vector graphics/images are "different animals". (Let's say, vector graphics are birds and raster graphics are whales.)

Raster images are made of colored dots, which are mapped to the pixels (which together make the computer screen), to create the image you see on the computer screen. The image cannot happen without the colored pixels. As far as I understand "dots" as in "dots per inch" (DPI) are pixels. Dots/pixels can be smaller, so that more of them are squeezed into the image dimensions. That's how the DPI can be increased in raster images, while keeping the image the same size.

If you have an image of a blue circle on a red background, there are blue pixels which create the circle, and red pixels everywhere else. If you scale the image of the blue circle on red bg, it becomes "pixelated" because the pixels are stretched bigger. If you delete the blue circle, you have a red image with a transparent hole in it. Because the only way to delete something from a raster image is to remove the pixels.

Vector images exist without pixels. So there is no such thing as DPI for vector images, because there are no pixels/dots. Vector images are made of objects, which exist independant of pixels. I think of vector objects as sort of floating above the pixels, although that's probably not a technically correct way to think about it. You can't squeeze more pixels into a vector image, because it's not made of pixels.

If you have an image of a blue circle on a red background, the red background is actually a rectangle (the same dimensions as the image) behind the blue circle. If you scale the blue circle, it gets bigger, while the rectangle stays the same. But it stays sharp, because there are no pixels at all. If you delete the blue circle, you still have the whole red rectangle left.

Note that's all my understanding, and I probably didn't say the right technical words. But I think it's generally a reasonable explanation.

http://en.wikipedia.org/wiki/Vector_graphics
http://tavmjong.free.fr/INKSCAPE/MANUAL ... phics.html


Return to “Help with using Inkscape”