Tuesday, July 3, 2007

Image Resolution, Pixel Dimensions and Document Size

Question: "Is it like a New Years' Resolution where I have to give something up for a month?"
Answer: "Nope, not that kind of resolution. And, I think you're actually supposed to give something up for longer than a month. But no, that's not it."

Question: "What about, like, 'resolving' a problem? That sort of resolution?"
Answer: "Nope. Well, kinda, in the sense that understanding image resolution can definitely solve a lot of problems. But really, no."

Question: "Hmm... Oh, I know! You mean, like, Prince & The Resolution, from the 80's - Purple Rain, Let's Go Crazy, that sort of thing?"
Answer: "Umm.... no. And, you're thinking of "Revolution", not resolution. Still, no, that's not it either."

So if it's not something you give up, has nothing to do with resolving an issue, and doesn't involve doves crying or partying like it's 1999, then what exactly is "image resolution"? Well, let me throw one more thing in there that image resolution has nothing to do with, and that's how your image looks on your computer screen. That's right, the resolution of your image has absolutely nothing to do with how your image appears on screen. It does, however, have everything to do with how your image will print.

Let's repeat that one more time. Image resolution has absolutely nothing to do with how your image looks on screen. It has everything to do with how it will print. Let's examine things further.

Pixel Dimensions

Here's a photo I took one day while strolling through a park. I saw this little guy (or girl, who knows) posing for me on the flowers and happened to have my camera handy. My camera, by the way, is an 8MP camera, and the reason why I'm telling you this will be explained shortly.

Photo of a bug on a flower.

Obviously, the photo you're seeing above is a much smaller version of the photo, since the actual-size version would be too large to fit on the screen. Let's pretend though for the sake of this lesson that we're working with the full size version of the photo. In order to see exactly how large the photo is, once we have it open inside Photoshop, we can simply go up to the Image menu at the top of the screen and choose "Image Size" from the list of options, which will bring up Photoshop's Image Size dialog box, as shown below.

Photoshop's Image Size dialog box

The Image Size dialog box can seem a bit frightening and confusing, but it's not meant to be and really, it's quite simple. It's divided into two sections, "Pixel Dimensions" and "Document Size". For the moment, let's ignore the Document Size part and focus only on Pixel Dimensions.

Pixel Dimensions

The term "pixel dimensions" here, to me, is confusing because it sounds like we're talking about the dimensions of each individual pixel, and that's not the case. What Photoshop is really telling us is the width and height of our image in pixels. In other words, how many pixels are in our image from left to right, and how many pixels are in our image from top to bottom. It's also telling us one other important piece of information which is the file size of our image. The dimensions and file size shown here are of the full size version of the photo above (the insect on the flower) before I resized it to something more suitable for a web page. So here, Photoshop is telling me that my photo has a width of 3456 pixels and a height of 2304 pixels. In other words, it contains 3456 pixels from left to right, and 2304 pixels from top to bottom. To find out exactly how many pixels I have in my photo then, I can simply multiply the width times the height, which in this case is 3456 x 2304, which gives me a grand total of 7,962,624 pixels. That's a whole lot of pixels.

Remember earlier when I mentioned that the camera I used to take this photo was an 8MP camera? Well, the "MP" stands for "mega pixel", and "mega" means "million", so "8MP" means 8 million pixels. This means that when I take a photo with my digital camera, the photo will be made up of 8 million pixels (approximately, anyway). If you have a 5MP camera, your photos will be made up of 5 million pixels. 4MP cameras give you photos made up of 4 million pixels, and so on. So if we take a look again at what the Pixel Dimensions section of the Image Size dialog box is telling us about my photo above, it's saying that my photo has dimensions of 3456 pixels wide by 2304 pixels wide, for a total of 7,962,264 pixels, which is pretty darn close to 8 million, and that's why my camera can be sold as an 8MP camera.

So that's what the first part of the Image Size dialog box is telling us - the width and height of our image in pixels. So far so good. Let's take a look now at the second part of the dialog box, "Document Size" which is where we really start to make sense of image resolution.

In the first part of our look at image resolution, we examined the first section of the Image Size dialog box in Photoshop, "Pixel Dimensions", which, as a quick recap, tells us the width and height of our image in pixels, and tells us the file size, which is usually in MB (megabytes, or "millions of bytes"). Nothing terribly confusing here.

The second section of the Image Size dialog box is "Document Size", which can be a bit more confusing but really isn't much more complicated than the Pixel Dimensions section. In fact, the two of them go hand in hand. Let's take a look at the Document Size section, and by the time we're done, you should have a pretty good grasp on the difference between the two and on image resolution itself.

Document Size

Pixel Dimensions and Document Size

Here's the two main sections of the Image Size dialog box once again, with Pixel Dimensions at the top and Document Size at the bottom. Again, the Pixel Dimensions part is telling us that the photo (shown in Part 1) has a width of 3456 pixels and a height of 2304 pixels, meaning our photo containts 3456 pixels from left to right and 2304 pixels from top to bottom. Lots of pixels to work with in Photoshop.

Document Size goes hand in hand with Pixel Dimensions, yet is also completely separate from it. "Gee thanks, that really cleared it up," you're saying. I know it sounds confusing, but bare with me for a moment. Notice at the bottom of the Document Size section, it says "Resolution", and in the Resolution box, it says "72". Notice also to the right of that is another box, this one saying "pixels/inch".

Resolution

What this is telling us is that when we go to print the photo, 72 pixels out of our 3456 pixels from left to right in our photo (the width), and 72 pixels out of our 2304 pixels from top to bottom in our photo (the height), will be printed for every one inch of paper. That's what "image resolution" means - how many of your image's pixels left to right and how many of the pixels top to bottom will print in every inch of paper. Of course, an inch is a square, which means the number of pixels from left to right and top to bottom will always be the same, and that's why the Document Size section contains only one number for Resolution. That number (72 here) represents both the left to right and top to bottom number.

So, if we have 3456 pixels from left to right in our photo, and 2304 pixels from top to bottom in our photo, and we have 72 pixels per inch listed for the resolution of our image, how large will our image actually be if we were to print it? Well, to figure that out, all we need to do is divide the width and height of our image (in pixels) by the print resolution (also in pixels). So let's do that:

3456 divided by 72 = 48
2304 divided by 72 = 32

After our simple math (yes I know, math sucks but this one's easy), we find out that at a print resolution of 72 pixels per inch, our photo is going to be 48 inches wide by 32 inches high. That's a huge photo! But wait a minute, didn't we see those numbers 48 and 32 somewhere before? Why yes we did. Take a look once again at the Document Size section:

Document Size and Pixel Dimensions once again

Look what values it's giving us for the width and height of our image - 48 inches for the width, and 32 inches for the height. Exactly what we came up with ourselves when we divided the number of pixels wide and the number of pixels high by 72 pixels per inch (the resolution). And that's really all that image resolution is. It's how many if your image's pixels will print inside every inch of paper, which then tells us how large the image will be when it's printed.

Keep in mind as we're going along that I keep saying "printed". I can't stress enough, and this is the number one reason why so many people have a difficult time grasping the concept of image resolution, that resolution means absolutely nothing until you go to print the image. It has absolutely nothing to do with how your image appears on your screen.

Just to prove there's nothing up my sleeve, let's change the resolution value of the photo from 72 to, oh, let's make it 300, which will mean that for every inch of paper when we go to print our image, 300 of our image's pixels will be printed from left to right and 300 again from top to bottom. You can see the change in the screenshot below:

Changing the print resolution to 300 pixels per inch.

Now, since 300 of our image's pixels from left to right are going to be fitting inside every inch of paper as opposed to only 72 pixels, it stands to reason that it's not going to take 48 inches of paper to fit the entire width of our photo into. Likewise, since 300 of our pixels from top to bottom are going to be fitting inside every inch of paper as opposed to only 72 pixels, it shouldn't still take 32 inches of paper to fit the entire height into. Just for fun, let's do the simple math ourselves. Once again, all we need to do is divide the width in pixels and the height in pixels by the resolution in pixels. So let's do that:

3456 divided by 300 = 11.52
2304 divided by 300 = 7.68

According to my math, when I take 3456 pixels wide and divide them by 300 pixels per inch, that gives me 11.52 inches. Likewise, 2304 pixels high divided by 300 pixels per inch gives me 7.68 inches. In other words, when I take my photo that's 3456 pixels wide by 2304 pixels high and print it at a resolution of 300 pixels per inch, my photo will be 11.52 inches wide by 7.68 pixels high. Let's take a look at what the Document Size section is telling us. Am I right?

Document Size showing width and height at 300 pixels per inch.

Looks like my math skills are stronger than ever (okay, so I used a calculator). Photoshop is showing us exactly what we expected, that at a resolution of 300 pixels per inch, it will take 11.52 inches wide and 7.68 pixels high to print our entire photo.

To summarize then, all "image resolution" means is how many of your image's pixels will print inside every inch of paper. Again, it has no effect at all on how your image appears on your screen, since your monitor has nothing to do with your printer.

Pixel Size

There's one other aspect that image resolution has to do with, and that's the size of the pixels when you go to print the image. It makes sense, really. An inch is an inch is an inch. The size of an inch is always the same. It's, well, one inch. So, since the size of an inch can't change, the size of the pixels has to change. For example, in order to fit 300 pixels into an inch, you would need pixels that are considerably smaller than if you only wanted to fit 72 pixels into an inch. Sort of like how, if you wanted to fit 10 people into a phone booth, you'd need people who were considerably smaller than if you only wanted to fit 3 people in there. Fortunately, you don't need to worry about that. Photoshop takes care of resizing the pixels for us. I just wanted to explain that "image resolution" really means two things - the number of pixels per inch that will be printed on the paper, and the size of those pixels. As I said though, Photoshop takes care of sizing them for us. All we need to do is make sure we're using the correct value for "pixels per inch".

"Hey, wait a minute!" you're thinking. "Correct value?! What correct value? There's an actual number I'm supposed to use for resolution that's 'correct'?!"

Yep, there sure is. Well, if you're concerned about image quality, anyway (and of course you are). We look at the "correct" resolution values to add for maximum image quality when printing in our next section - How Image Resolution Affects Print Quality.

Have you ever downloaded an image from the internet and then printed it, only to get results that were, well, less than you expected? The image looked great on your computer screen, but when you printed it, it either printed at the size of a postage stamp or it printed at a decent size but looked blurry and/or "blocky"? The culprit is image resolution.

Actually, that's not really fair to say. Image resolution didn't purposely set out to make your life miserable when you printed your downloaded internet photo. The problem was simply that most photos on the internet have very small pixel dimensions, usually in the neighborhood of 640 pixels wide by 480 pixels high, or even smaller, and that's because images don't need to be very large in order to appear at a decent size and good quality on your computer screen, and also because smaller images download much faster on websites than larger images do. But that's getting into a whole other topic of optimizing images for the web, and we don't need to worry about that here.

So what can you do to make photos you download off the internet appear just as high quality when printed as photos you took yourself with your digital camera? The answer - absolutely nothing. There simply are not enough pixels in most internet images to allow them to print at high quality, without printing them at the size of a postage stamp, that is. Let me explain why.

First of all, let's get off the topic of downloading images off the internet (since we really shouldn't be doing that anyway without permission from the copyright owner) and look at image resolution in general. We covered it in much more detail in the "Resolution, Part 1" and "Resolution, Part 2" sections of the website, so this will be a short recap.

The term "image resolution" means how many of your image's pixels will print inside every inch of paper. As I stated in those two main "Resolution" sections of the website, image resolution has everything to do with printing your image and nothing to do with how it appears on your computer screen, which is why images you download off the internet usually appear much larger and/or higher quality on your screen than they do when you print them.

Let's use a photo as an example:

Horse

I can't help but laugh every time I see this photo of a horse I took while driving around the countryside one day. Normally this horse stands proud, beautiful yet powerful, full of grace and dignity. Yet I seem to have caught him in a rather unflattering moment. He's standing on a bit of a strange angle, he has a piece of straw dangling from his hair, and he seems to be in the middle of chewing his food. Either that, or he's desperately trying to crack a smile for me, I'm not sure. However, since this guy is already embarrassed, as am I for being such a great photographer, let's use this photo as an example.

Shutterfly.com

On your screen, this photo looks decent enough as far as image quality goes. It's large enough to make out that it is in fact a picture of a horse, and it doesn't appear blurry or blocky. Overall, a pretty good quality photo. Let's take a look at what Photoshop's Image Size dialog box is telling us though.

Image Size dialog box

As we saw in the "Resolution, Part 1" and "Resolution, Part 2" sections, Photoshop's Image Size dialog box (which you can access by going up to the Image menu at the top of the screen and selecting "Image Size" from the list of options) is divided into two main sections, "Pixel Dimensions" and "Document Size". The Pixel Dimensions section at the top is telling us that this photo contains 500 pixels from left to right (the width) and 333 pixels from top to bottom (the height). It's also telling us that the file size of the image (before I optimized it for the web) is 975.6K (kilobytes, or "thousands of bytes"). That may sound like a lot of pixels (500 wide x 333 high), and it is for displaying on a computer screen, but let's take a look at the Document Size section to see how large our image is going to be if we try to print it.

Document Size

The Document Size section of the Image Size dialog box tells us two things - what the current print resolution is of our image, and what the width and height of our image will be when printed based on what the print resolution is. Currently, it's telling us that our print resolution is 72 pixels per inch, which means that of the 500 pixels we have in our image from left to right, 72 of them will print in every inch on paper, and of the 333 pixels we have in our image from top to bottom, 72 of those will print in every inch on paper. The number value in the Resolution box is for both width and height, not the total number of pixels that will print. Think of it like this - what the Resolution section is saying is, for every square inch of paper, 72 pixels from our image will be printed from left to right and 72 pixels from our image will be printed top to bottom. The total number of pixels in every square inch on paper then would be, in this case anyway, 72 x 72 (72 for the width times 72 for the height), which gives us 5184 pixels.

Let's quickly do some simple math ourselves to make sure that the width and height being shown to us in the Document Size section is correct. We know from the Pixel Dimensions section that we have 500 pixels from left to right in our image and 333 pixels from top to bottom. Our print resolution is set to 72 in the Document Size section, so to figure out how large our image will be when printed, all we need to do is divide the number of pixels from left to right by 72, which will give us our width, and the number of pixels from top to bottom by 72, which will give us our height. Let's do that:

500 pixels wide divided by 72 pixels per inch = 6.944 inches wide
333 pixels high divided by 72 pixels per inch = 4.625 inches wide

Based on our own simple calculations, we see that at a print resolution of 72 pixels per inch (ppi), our image will be 6.944 inches wide by 4.625 inches high. And if we look at the Document Size box again:

Document Size

That's exactly what it says! Wow, that's going to print large enough to give us a standard 4x6 inch print, with a little extra to spare! That's great!

Sadly, no. If only life were that simple.

The fact is, 72 pixels per inch is not enough to give us good quality, professional-looking images when printed. It's not even close. To show you what I mean, here's the photo of the horse again as it looks on your screen:

Horse

And here's an approximation of how this same image will look if you try to print it as a 4x6 inch photo at its 72 pixels per inch resolution:

Horse image again, as it would appear printed as a 4x6 inch photo

Doesn't exactly look good, does it? The problem is that at 72 pixels per inch, there simply isn't enough image information being printed for the photo to look good. It's fine for looking at an image on your computer screen because computer monitors are generally referred to as "low resolution output devices". They don't require high resolution images in order for the images to look great on them. Printers, however, are high resolution devices and do require high resolution images to maintain image quality.

So how high of a resolution value do you need for professional quality printing? The generally accepted number is 300. Printing an image at a resolution of 300 pixels per inch gives you enough image information for professional quality prints. In fact, 300 is usually a bit more than you need. You can often times get by with 240 pixels per inch for resolution without noticing any loss of image quality. The professional standard though is 300 pixels per inch.

Let's take our same image then at 500 pixels wide by 333 pixels high, change our resolution from 72 pixels per inch to 300, and see what we get. Here's the Image Size dialog box again showing the new resolution of 300 pixels per inch. Notice in the Pixel Dimensions that we still have 500 pixels for the width and 333 pixels for the height. The only thing that's changed is our resolution, from 72 to 300:

Image Size dialog box

And here's an approximation of how the image will look when printed at 300 pixels per inch:

Horse photo printed at 300 pixels per inch.

Hmm. Wait a second, that can't be right, can it? I mean, sure, the quality of the image looks much better now, but look how small it is! Well, actually, that's exactly right. Look closely at the Document Size section again:

Document Size

Notice how it confirms that our image resolution is 300 pixels per inch, but check out the values for width and height. Our width is now only 1.667 inches, and our height is only 1.11 inches. That's because our image only contained 500 pixels from left to right and 333 pixels from top to bottom, so by printing at 300 pixels per inch, it didn't take much to fit the entire image on paper, and we're left with an image that looks great as far as quality goes, but is probably much smaller in size than anything you'd have a use for.

So okay, we've proven that downloading images off the internet and trying to print them isn't going to work. But forget about internet images. What about the photos I've taken with my digital camera? How can I make sure I'm using the right image resolution to get professional print quality from my printer? An excellent question, and the answer comes to us once again through some boring yet simple math.

Let's say you've taken some photos of your recent family vacation using your digital camera and you want to print out some 4x6's on your printer. We know now that in order to achieve professional quality prints, we need set the resolution of our images to a minimum of 240 pixels per inch, although 300 pixels per inch is the standard and is the ideal resolution to use. Let's look at both of these resolution values though to see how large of an image, in pixels, we'll need out of the camera in order to print 4x6's with good image quality. First, let's look at 240 pixels per inch:

To figure out how large, in pixels, our images from the camera need to be in order to print 4x6's at professional quality, all we need to do is multiply 240 times 4 for the width, and then 240 x 6 for the height (of course, that's assuming the photos are using "portrait" orientation. "Landscape" orientation photos would have 4 for the height and 6 for the width). Let's do that:

240 pixels per inch times 4 inches wide = 960 pixels
240 pixels per inch times 6 inches high = 1440 pixels

Based on our simple math, we can see that in order to print a digital photo as a 4x6 at 240 pixels per inch resolution, which should give us good quality, our photo's pixel dimensions need to be 960x1440. We can see exactly how many pixels that is by multiplying 960 by 1440, which gives us 1,382,400 pixels. Let's round that up to 1.4 million pixels. That may sound like a lot of pixels but it really isn't, not when you consider that 1.4 million is the minimum number of pixels you'd need to print good quality 4x6 photos using the minimum resolution we can to achieve good quality, which is 240 pixels per inch. The good news at least is that these days, most digital cameras on the market are 4MP ("mega pixels", or "millions of pixels") cameras and higher, so they'd have no trouble printing good quality 4x6's even using 300 pixels per inch for the resolution.

Of course, we haven't actually looked at how many pixels we'd need to print professional quality 4x6's at 300 pixels per inch, so let's do that now. We'll use the same simple formula as above, where we'll multiply 300 by 4 and then 300 by 6 to give us the pixel dimensions we'll need:

300 pixels per inch times 4 inches wide = 1200 pixels
300 pixels per inch times 6 inches high = 1800 pixels

Let's do one more quick calculation to see how many pixels we need in total:

1200 pixels wide times 1800 pixels high = 2,160,000

So, in order to print a photo as a 4x6 using the professional standard of 300 pixels per inch for resolution, our photo needs to be 1200 pixels wide by 1800 pixels high (again, depending on whether the photo is in portrait or landscape orientation, the width and height may need to be flipped), which means we'll need a total of 2,160,000 pixels, which again should be no problem for most digital cameras on the market today which are 4MP and higher.

What if you have a photo you absolutely love and feel it deserves an 8x10 print rather than a 4x6? How large of an image in pixels do we need to print a good quality 8x10? The answer is as easy as when we needed to find out how large of an image we'd need for a 4x6. All we need to do is multiply the resolution value in pixels by the width in inches, and do the same thing for the height. Let's first use 240 pixels per inch as our resolution:

240 pixels per inch times 8 inches wide = 1920 pixels
240 pixels per inch times 10 inches wide = 2400 pixels
Total number of pixels = 1920 pixels wide times 2400 pixels high = 4,608,000 pixels

From our little bit of math, we can see that in order to be able to print a photo at good quality as an 8x10, our photo needs to be 1920 pixels wide by 2400 pixels high, for a total of approximately 4.6 million pixels. Now we're starting to push the limits of lower end digital cameras. A 4MP digital camera doesn't use quite enough pixels to be able to print an image at 8x10 at 240 pixels per inch resolution. It's about 600,000 pixels short. You can still print an 8x10 image of course, but you're not going to get professional image quality anymore.

Let's do the same calculations for an 8x10 at 300 pixels per inch resolution:

300 pixels per inch times 8 inches wide = 2400 pixels
300 pixels per inch times 10 inches wide = 3000 pixels
Total number of pixels = 2400 pixels wide times 3000 pixels high = 7,200,000 pixels

Now we're really pushing the limits as far as digital cameras currently on the market. In order to be able to print a photo as an 8x10 using the 300 pixels per inch resolution standard, our photo needs to be 2400 pixels wide by 3000 pixels high, for a total of 7.2 million pixels! Now that's a lot of pixels! This means you need at least a 7.2MP digital camera in order to be able to print your photos as 8x10's and still get true, professional quality prints.

SOURCE

technorati tags:, , , , , ,

No comments: