How to set photo resolution. What is dpi

What are pixels and what is DPI? September 20th, 2012

Do the words "pixels" and "DPI" scare you, or do you not fully understand their meaning? Then a few lines below are for you.


Pixels on the screen are the dots on the screen that form the image.
Pixels in raster graphics are the minimum color points that form the image.
Size in pixels- the width and height of the image. For example, 800x600 means that the image has 800 dots horizontally and 600 dots vertically.

DPI is short for English d ots p er i nch" and translates as "dots per inch".

The number of pixels per unit length is called resolution. The more dots per inch, the higher the resolution and thus the better the image. The illustration below will clearly show this difference:

What does 72 DPI or 300 DPI mean and what is the difference?

72 DPI(or 96) - files for the Internet, where one point on the screen of your monitor corresponds to one pixel of the image. Also called screen image resolution. More than 72 DPI to make a picture for the Internet - it makes no sense, since the monitor will not display any more anyway.

72 dots per inch = 28 dots per centimeter.

300 DPI necessary for high-quality printing in the printing house. The number of dots per inch has been significantly increased to improve image quality. But for each type of printing, this value can change. In general, if a printed product is viewed by a person at a close distance, then the number of dots per inch should be high. These are magazines, booklets, leaflets. For the layout to be considered at a distance the requirements are below. For example, for a billboard, this value can be 56 dpi and below.
300 dots per inch = 118 dots per centimeter.

Turitsyn Andrey

What is dpi?

What is dpi? To begin with, it’s good to understand with what density of dots per inch (this is dpi) you need to print a picture. It is believed that the human eye cannot see more than 300 dpi, which is taken as the basis for the standard in printing (I would say far-fetched). It all depends on how far the print is viewed from, doesn't it? :-) If we consider the print High Quality and excellent detail, 10x15 cm in size - from a distance of 5 meters, then no small parts you still won't see it! Therefore, the value of 150-200 dpi is not critical - for quality, which is quite sufficient. The quality is rather not a photo, but a viewing. And everyone will choose the distance for comfortable viewing of prints for their own vision.

The following table lists the most common photo card formats and the number of pixels needed to print at 200 and 300 dpi. From it we see that even a 2-megapixel camera is enough to print a regular 10 x 15 cm image.

Photo size and image resolution
print seemegapixels image size at 300 dpi at a resolution of 200 dpi
3 x 40.17 MP354x472236x315
10 x 152.09 MP1181 x 1772787 x 1181 0.93 MP
11 x 15 (3:4)2.30 MP1299 x 1772866 x 1181 1.02 MP
13 x 183.26 MP1535 x 21261024 x 1417 1.45 MP
15 x 20 (3:4)4.18 MP1772 x 23621181 x 1575 1.86 MP
15 x 224.60 MP1772 x 25981181 x 1732 2.05 MP
20 x 308.37 MP2362 x 35431575 x 2362 3.72 MP
30 x 40 (3:4)16.74 MP3543 x 47242362 x 3150 7.44 MP
30 x 4518.83 MP3543 x 53152362 x 3543 8.37 MP
30 x 6025.12 MP3543 x 70872362 x 4724 11.16 MP
30 x 9037.66 MP3543 x 106302362 x 7087 16.74 MP

3:4 - formats with an aspect ratio of 3:4 are marked (usually used in compact cameras).

Why do you need dpi?

So what is dpi? Why is it in the table? Why is it needed at all? With dpi and pixel count you can quickly figure out approximate size each side of the photo to be printed in centimeters. So that no one suffers, I deduced a simple formula:

where:
x is the desired size of one side of the print in centimeters;
r - side resolution in pixels;
d - 2.54 cm (inch);
dpi - any right amount dpi, for example, 300 :-)

By the way, dpi can only be a positive integer.

Example: we have a resolution of the image width of 2598 pixels, and dpi=300.
Then 2598 * 2.54 / 300 = 21.99, getting 22 cm across the width of the print

Of course, neither in the table nor in the formula did I take into account the distance from which the photographs are viewed (especially in connection with individual features vision), so the dpi numbers are indicated as "professional" as possible. It is generally accepted that to view a print from a distance of about 30 centimeters (view anything, say, a 10x15 photograph), you need a resolution of 300 dpi. But all large pictures will be viewed from a greater distance ... no one wants to look at a print of 30x45 cm from a distance of, say, 10 centimeters ... If you don't believe, be sure to try it :-) you can advise printing workers who require an indispensable value of 300 dpi .

Trying to do it yourself in a graphical editor? Let me give you an example of Photoshop. Upload a photo, use the "crop" tool to make the desired aspect ratio (35 by 45), click "Image" at the top, then "image size", and there you will find points, millimeters, and dpi. We expose desired values and click OK.

A couple of questions.
Does image resolution depend on dpi?
The answer is no.

There is a common opinion: the more points in the photo, the better it is.
Does the quality of a photo depend on the number of notorious pixels?
The answer is no.

The resolution of images depends on the number of pixels in width and height, and the quality of resolution depends on the size of the matrix, a good lens and skillful hands photographer.

Crazy hands are the deciding factor in most marriages. For example, even a resolution of 100 megapixels will not help a blurry photo, because it will still remain blurry - at any print size, any dpi and viewing distance. And then all the troubles are usually blamed on a bad camera or lens :-)

For full-color offset printing for books, 150 dpi is enough. Multi-meter posters may have even lower dpi. In general, dpi is only a reference value, or a command to the printer in automatic mode, which tells only about the desired scale when printing. And from what distance to consider a tiny postage stamp or an advertising poster on the street, a person will decide for himself. It's best not to see ads at all... :-)

But in specific shooting, dpi can be very important. For example, aerial photography for cartography. For a large map must be viewed very closely and carefully, especially by spies. Especially for spies with a camera :-)

Preparing for Photo Printing

Where is it better to print photos: at home on a printer, or at a photo printing kiosk? Home photo printing has the advantage of convenience and complete control over the process. Disadvantages - the high cost of prints in comparison with a photolab. But in photography, it's the other way around. Therefore, many people look at photos on the monitor :-)

For hobbyists who still like to print photos, we will look at some typical cases.

Photos from digital cameras may have an aspect ratio of both 4:3 and 3:2 - depending on the camera model. Therefore, choose the appropriate paper size from the table above, and even better, find out in advance in the photo lab about what is available.

In cases where the aspect ratio of the image and the selected print format do NOT match, we crop the image in the photo editor in the desired ratio, or ask the photo lab to "print with margins". If they match, you should ask the photo lab to "make it borderless", which will avoid narrow white stripes along the edges of the photo paper.

A small part of the image may be cropped, regardless of the cropping accuracy. This sad fact is connected with the tolerances of printing machines for paper play. Therefore, it is recommended to place significant image fragments further than 2 mm from the edge. Even better, to compensate for paper backlash, prepare images with a margin in width and height, but no more than 50 pixels per image side.

P.S. I have only given approximate reference values. And specific tolerances should be clarified with the workers of a particular photo printing.

What paper is better to print on: matte or glossy? On the glossy picture looks brighter, but great glare. On matte photo paper, the opposite is true. But no matter what you print, a bad picture will still remain bad :-)

At least three parameters are used to measure the size of photographs - digital image resolution (in pixels), print size (in centimeters) and print resolution (dpi - dots per inch). For a user who first encountered the task of converting an image, preparing it for printing, it is sometimes difficult to figure out these settings, you have to act at random and go to desired result through trial and error, wasting a lot of time and paper.

Let's take a simple example of a problem. You need to take a photo for ID. You can go two ways - go to a photo studio and take a picture there, paying 150 rubles for 4 small photographs printed on a sheet of 10 * 15 cm. The second option is to take a picture at home, prepare an A4 sheet for printing, on which to squeeze as many of your photos different sizes enough for several years to come. Then you go to a photo studio and print your creation on an A4 sheet for 30 rubles. It seems that the profit from one order is ridiculous, but if you need to print photos for several people at once (for example, when the whole family is photographed for a visa before traveling to another country), then you can save more money. And this is just one of the examples. Another question is how to keep the dimensions of the photos so that they are exactly 4 * 5 cm on the print (or some other size). In order to adjust the print size to the required one, you need to understand the connection centimeters, pixels and dpi.

Pixels

A pixel is a single dot that makes up an image. A pixel is also called a cell of an image on a monitor or LCD TV. Look closely at the monitor and you will see a barely noticeable grid, one cell of this grid is a pixel. The photo that you downloaded from the camera has a resolution of several megapixels, that is, for example, 6000 pixels wide and 4000 pixels high - this is 6.000 * 4.000 = 24.000.000 pixels or 24 megapixels. When viewed on a monitor, the picture is automatically scaled to the resolution of the monitor (about 2 megapixels). If we try to zoom in (stretch the photo), then to some extent the picture is stretched without a visible loss of quality, but then characteristic squares appear on it. This happens when the actual resolution of the photo is less than what we want to see - the pixel size on the photo has become larger than the pixel size on the monitor.

centimeters

What is "centimeter", I think, it is not necessary to explain. In our case, the size of the prints of a photograph is measured in centimeters. Usually photos are printed in the size of 10*15 cm, but sometimes larger formats are used - 20*30 cm (approximately corresponds to the A4 format), 30*45 cm (A3) and more. You have probably encountered a problem - you found on some site beautiful photo and decided to print it in a large format (for example, 20 * 30 cm), but after printing, they noticed that the quality of the print was not very good - the objects' outlines turned out to be a little blurry. The saddest thing is that this photo cannot be corrected by any processing. And all because the resolution of the photo on the site is, for example, 900 * 600 pixels. That is, for 1 pixel on the printout it will have a size of approximately 0.33 millimeters - while it is difficult to count on "ringing" sharpness! And here another image quality parameter appears, with which you can evaluate the quality of the print - DPI

DPI

DPI is an abbreviation for the English phrase Dots per Inch, which translates into Russian as dots per inch. This value just shows how many image pixels fall on one "linear" inch when printed (an inch is 2.54 cm). There is also the value of DPC (dots per centimeter), but it is used less often - whatever one may say, all these printing technologies came to us from where inches, feet, pounds, etc. are in use. So, let's return to our example - a picture of 900 * 600 pixels, which we decided to print in a format of 30 * 20 cm. Let's translate centimeters into inches for convenience - we get 11.8 * 8.9 ". If we divide 900 pixels by 11.8", then we get the print resolution 76dpi. This roughly corresponds to the resolution of the monitor with its "large" pixels, so the picture on the screen looks good. But to get a print of acceptable quality, you need a print resolution of at least 150 DPI, and if you want very good detail, at least 300 DPI. To ensure this resolution when printing 30*20 centimeters, the original digital image must have a resolution of 3540 * 2670 pixels - about 9 megapixels. So they found the reason why the photos printed "from the Internet" look blurry and cloudy. Now let's get back to our question - how to adjust the image resolution so that it prints at a given size? As an example, consider the preparation of photographs for documents.

Creating your own photo for documents - step by step instructions

Suppose you need to take some 4*6 cm photos and place them on a 20*30 cm sheet. How to do it?

1. Take the original image, open it in Photoshop. Select the menu item "image" - "image size". We are presented with the following dialog box:

In the dialog that opens, we see two groups of settings - "dimension" and "print size". The "dimension" group displays the dimensions of the digital image in pixels. We do not touch these settings! In the "imprint size" group, set the size we need in centimeters (the units of measurement are selected from the drop-down lists). In our case, this is 4 * 6 cm. We also set the print resolution - 300 pixels per inch, with this we will ensure good quality print.

By changing the print size settings, we see that the pixel dimensions also change. That's how it should be! After all this, press the OK button. The image changes in size. Now we need to copy it - use the key combination:

  1. Ctrl + A (eng) - select all
  2. Ctrl + C (eng) - copy to clipboard

What is copied to the clipboard, we will transfer to a separate canvas, see step 2. 2. Now we need to create a new image that will fit the 20*30 cm sheet that we are going to print to the photo lab. Select the menu "File", "Create", a dialog box appears:

Specify the size of the photo paper on which printing will be performed (20 by 30 cm) and set the resolution in pixels per inch to be the same as our photo has - 300 DPI. We press OK.

3. An empty image with a transparent background appeared. Press the key combination Ctrl + V and paste our first image on a new canvas. It will look something like this:

The image is pasted as a new layer. Move it to the upper left corner, then select the menu "Layer", "Duplicate Layer".

Another similar picture will appear on the canvas, initially it "lies" on the original layer. We move it and put it next to it. In the same way, we create as many duplicate layers as we need. After that, we perform the flattening of the layers (menu "Layer", "Perform flattening").

We save the picture in JPEG format, copy it to a USB flash drive and go to the photo lab. We tell the operator the following - "print this image with a format of 20 * 30 cm with a resolution of 300 DPI without scaling". In this case, small pictures will have exactly the size that we indicated for them - in our case 4 * 6 centimeters. It is advisable to have a ruler with you to check the size of the prints.

You want the pixel resolution to be high enough to support accurate OCR. Font size (for example, in points) is usually measured in units of length, not pixels. Since 72 dots = 1 inch, we need 300/72 pixels per dot for a resolution of 300 dpi ("pixels per inch"). This means that a typical 12-point font has a height (or more accurately baseline to baseline distance in single line text) of 50 pixels.

Ideally, your source documents should be scanned at the appropriate resolution for the given font size, so that the font in the image is around 50px. If the resolution is too high/low, you can easily rescale the image with a graphics program (such as GIMP). You can also do this programmatically through a graphics library like ImageMagick which has interfaces to many programming languages.

DPI makes sense when you associate an image in pixels with a physical device with the size of the image. In the case of OCR, this usually means the resolution of the scan, which is how many pixels you get for each inch of the scan. A 12-point font is designed to print 12/72 inches per line, and an uppercase character can fill about 80%; thus, when scanned at 300 DPI, it will be approximately 40 pixels.

Many image formats have DPI written into them. If the image was scanned, it must be a fine adjustment from the scanner. If it comes from a digital camera, it always says 72 DPI, which is the default value given by the EXIF ​​specification; this is because the camera cannot know the original size of the image. When you create an image with an imaging program, you may have the option to set the DPI to any arbitrary value. This is a convenience for you to specify how you want to use the final image and has nothing to do with the details contained in the image.

Here's a previous question that goes into the details of resizing an image: How do I perform high-quality image scaling?

"How do I do this... I'm under the impression that dpi is for monitors, not image formats."

DPI stands for dots per inch. What does this have to do with monitors? Well, we have a pixel of three RGB sub-pixels. The higher the DPI, the more detail you cram into that space.

DPI is a useful measurement for displays and prints, but nothing useful... really nothing for the image formats themselves.

The reason DPI is tagged inside some formats is to tell devices to render at that resolution, but from what I understand almost everyone ignores this instruction and does their best to optimize the image for a particular result.

You can change 72 dpi to 1 dpi or 6000 dpi in the image format and it won't affect the monitor. "Upsize/downsize to 300 dpi" doesn't make sense. Resampling doesn't change DPI either. Try it in Photoshop, uncheck "Resample" when changing DPI and you won't see any difference. It will NOT be more or less.

DPI is absolutely meaningless for image formats, IMO.

OCR software is usually designed to work with "normal" font sizes. In terms of the image, this means that it will look for letters, perhaps in the range of 30 to 100 pixels. Much higher resolution images will produce letters that appear too large to software OCR could process efficiently. Likewise, lower resolution images will not provide enough pixels for the software to recognize the letters.

Today we will dot the "i" and figure out this very tricky question.

Frequently asked questions on this topic: less or more dpi? The more the better quality photos? And what does this have to do with the size of the photo itself?
More and more often there is a misconception about the "quality" of pictures and the required 300dpi.

First, let's define what dpi is ... dpi is a setting that indicates the resolution of an image per inch when it is printed. And here the attentive reader will think. Yes, it is when printing. And while you are not printing the image, but just looking at the monitor, processing in Photoshop - dpi does not matter at all. It does not affect the quality or the size of the photo you will print (10*15 or A4) and does not affect anything at all. The only one important parameter while you have a photo in digital form - this is the size in pixels. And that's it! This is the harsh reality.

Let's take it in order:

1. What if less or more than 300?
Yes, as much as you can. While you are not printing, there is no difference, at least 1dpi, at least 1000dpi.

2. What about the quality? After all, at 300 everything will be fine, as they write everywhere on the Internet and in general it is on everyone's lips. So if the value is less, then the quality is worse?
As I wrote above, the quality has nothing to do with the dpi parameter. Dot. Deal with it.

3. But what if I'm going to print a photo? Then this parameter is already important, and here the more - the better?
Not really. This setting specifies how many dots (read: pixels) will be printed per inch of the image. In this case, the dpi value can be set to any. For example, there is a photo of 4000*6000 pixels in size. At 300dpi, it can be printed at 34 cm * 51 cm (rounded tenths). But at the same time, you can print with a different dpi value. At 150dpi it will be 67.7 cm * 101.6 cm.

4. And what value then to put?
It already depends on where the print goes. If in a glossy magazine, then 300dpi is quite suitable. For the house in a family album - 100-300dpi (approximately). And for a huge billboard, 20-70dpi is generally enough.
But I repeat once again - the size in pixels is more important if we are talking about quality! Imagine that you have 2 photos on your computer: One of 600*800 pixels with 600dpi. And the second one is 2000*3000 pixels with 70dpi. Which of them can be printed more and better? It would seem that the first one, it has as much as 600dpi - cool, that means it! But no, the physical size in pixels is larger for the second file, despite the miserable 70dpi. The dpi parameter itself, while it is in a digital file, means nothing. When printing these two files, you can already select the desired dpi value. We will average it to an adequate value of 250 (here you could take any number) and get a physical print of the first file 6.1 cm * 8.1 cm, and the second 20.3 cm * 30.5 cm. As you can see, who has the size in more pixels - that one has a larger physical size when printed.

5. Where does 300dpi come from then and why is it required almost everywhere?
I don’t know where exactly 300 came from, but with this value, the printing house or photo lab guarantees you excellent print quality (taking into account that the size in pixels corresponds). In fact, this is an average figure, which may vary depending on your printing tasks.

This photo has 2 photos open in Photoshop. The photo on the left has 900dpi. The photo on the right has 1 dpi. As you can see, physically they look exactly the same.

If suddenly you come across a person who calls himself a professional and demands some ridiculous 300 dpi from you, without understanding what they mean - this is an ignoramus with whom you should not work. A person cannot be a professional if he needs some parameters in which he himself does not understand anything. It is better to refuse the services of such a person. Be it a retoucher, photographer, illustrator or anyone else.

And now some lyrics. I have long wanted to write this article, but kept putting it off. A Lately more and more often I explain to people that dpi means nothing in a digital form of photography. Boiled.

From real cases:
1 - The customer writes to me. Initially, there was a scan of the photo. And at the output you need, I quote: “We need a quality of about 600dpi, i.e. a digital photo, not an edited scan..”
2 - In one public of retouchers, there was a conversation about how much to set dpi when retouching ... And here is a quote from one retoucher: "Somehow they wanted to force me to redo it, because it was 240.".
3 - We need a photoshoot, 10 photos at 300dpi output.

I hope you also appreciate the absurdity of these cases... and that's just in the last week.

I bow out on this. Peace for everyone!