Macroware Technology

Welcome Portlet


Welcome to Macroware Technology Blog.

The purposes of this engineering blog:

- Share knowledge
- Learn
- Have fun
- Document what I was doing / thinking

Search Box

 

Private Area

Mailing List

Engineering Education

Engineering Organizations

Professional Career Networking Groups

Electronics Hobby

Trade Publications

Photo Resolution and DPI

posted Tuesday, 31 October 2006
I recently wanted to scan in some old family photos that were fading to preserve them.  I became confused by the scanner software settings.  The first confusing term is DPI.  The software makes it sound like this is a measure of resolution.  It is not.  Strictly speaking DPI stands for dots per inch and refers to the number of dots that are printed per inch in both horizontal and vertical direction on a piece of paper by a printer.  It has nothing to do with how many pixels make up an image in the computer which is a true measure of resolution.  DPI is the conversion factor that tells you how big a printed image will be when you print it out.  For instance if an image is 1200 pixels by 600 pixels and you print it at 300 DPI the image size on the paper will be:

1200 pixels / 300 DPI = 4 in. horizontal
600 pixels / 300 DPI = 2 in. vertical

When a digital camera takes a picture, it can actually make a DPI setting inside the picture file (JPG).  Typically it is set to 72, and that is true for my 2 M pixel Panasonic camera.  If the camera takes pictures at a resolution of 1600 x 1200, the native size of the picture at 72 DPI would be calculated as follows.

1600 pixels / 72 DPI = 22.2 in.
1200 pixels / 72 DPI = 16.7 in.

If this image is actaully printed on a printer at 400 DPI, the size would be:

1600 pixels / 400 DPI = 4 in.
1200 pixels / 400 DPI = 3 in.

Some software will allow you to change the DPI setting in the JPG file, but you need to be careful when doing this.  If you double the DPI, the software may attempt to double the number of pixels.  Since those new pixels don't exist, the software will try to interpolate them, and the picture could become grainy.  If you were thinking that DPI was a measure of resolution, and you increased it in the software, you would actually end up making the picture look worse.  Photo software should not use DPI and resolution interchangably, but it is often done.

Another intersting point is what is the DPI setting of a typical monitor.  My 17 in. LCD monitor is about 13.25 in. x 10.75 in.  With the resolution set to 1024 x 768, the DPI on the screen is calculated as follows:

1024 pixels / 13.25 = 77.3 DPI horizontal
768 pixels / 10.25 = 74.9 DPI vertical

One more point is that if you print an image that looks fine on a screen that has about 75 DPI on a printer with the same DPI setting, it will not look very good.  The reason is that on a screen there is much more granularity of color settings for each pixel (dot) on the screen than the printer can produce for every dot on a printed page.  Since the printer has coarse control over the color of each dot, it must use many more dots to achieve the similar image quality to what you see on the screen.  That's why printers can print in 600 or 1200 DPI for quality pictures.

Anyhow, my real question was what should I set the scanner software to in order to scan the pictures in.  The scanner actually does use DPI as a measure of the resolution of the scanned picture.  If the picture is 4.5 in. x 3.5 in. and you set the scanner to scan at 200 DPI (which is what the software defaulted to), the resolution of the scanned picture would be:

4.5 in. * 200 DPI = 900 horizontal pixels
3.5 in. * 200 DPI = 700 horizontal pixels

For a total pixel count of 630 K pixels, not even 1 M pixel.  Since my 2 M pixel camera seems to produce pretty good pictures, I calculated the required DPI setting backward to get that many pixels as follows:

1600 pixels / 4.5 in. = 355.6 DPI
1200 pixels / 3.5 in. = 342.9 DPI

The valid settings in my software were 200 DPI, 300 DPI and 600 DPI.  The scanned picture looked very similar at all three of these resolutions.  So I went with the 600 DPI setting, because it gave the most pixels.