To resize an image, we change its overall dimensions, but not the number of pixels in it. To resample an image, we change the number of pixels in it. Resolution Let's talk a little about resolution because this is a commonly misunderstood concept. Resolution is really quite simple. It is defined by the number of pixels that we have in an image, and the size of the space that these pixels are contained in. Two parameters are necessary to specify resolution: the number of pixels per inch and the total number of inches (or centimeters, or millimeters, or whatever unit of length you choose). More pixels in a given space mean higher resolution. These two parameters, the number of pixels, and the size of the space, are intimately related. For example, suppose we have a DSLR camera with a sensor that has 1500 x 1000 pixels in it. We can display these 1500 x 1000 pixels at any size we like. But as the display size gets larger, the resolution of the image goes down. The number of pixels is fixed. At larger sizes, you just have less of them per inch, because you have more inches. Our 1500 x 1000 pixel image, when displayed at 15 x 10 inches, would have 100 pixels per inch of resolution. The exact same file, with the exact same 1500 x 1000 pixels, when displayed at 7.5 x 5 inches, would have 200 pixels per inch of resolution. So the exact same file can have different resolutions based on the size it is displayed at.
The full resolution file is the optical resolution of the sensor, with the pixels in the sensor corresponding exactly 1:1 with the number of pixels in the image. For example, my DSLR has a sensor that has 3888 x 2592 active pixels in it. This is called its optical resolution. It will output an image file that also has exactly 3888 x 2592 pixels in it. This is a full resolution file. If we output this full resolution file to a computer monitor that has a display of 1024 x 768 pixels, it is obvious that the 3888 x 2592 file is not going to fit. The number of pixels in the monitors display is fixed, as well as the size of the display. For example, my laptop has a 1024 x 768 pixel display that is 11 x 8.5 inches in size. So its resolution is about 93 pixels per inch (1024 pixels / 11 inches = 93.09 pixels per inch). If we take our 3888 x 2592 pixel file and make it 93 pixels per inch, it will be 41.8 inches. This is why it will not fit on the screen at full resolution. How can we make it fit? Resizing Resizing is simple. We just change the size of the display and keep the original number of pixels. Larger sizes will have lower resolution. Smaller sizes will have higher resolution. But Resizing our 3888 x 2592 pixel image will not make it fit because the number of pixels in the laptop's display, as well as the size of the display, is fixed. To make it fit, we will have to change the number of pixels in the image so one side is 1024 or 768 pixels. It won't fit exactly because 3888 x 2592 is not the same proportions as 1024 x 768. To change the number of pixels in an image, we have to resample it. Resampling Resampling is where it gets more complicated. With resampling we want to change the number of pixels in an image. We could just cut some pixels off of each side to get down to the number of pixels we want by cropping, but this won't preserve the entire image. To change the number of pixels from 3888 to 1024, we are going to need some kind of mathematical algorithm that looks at the pixels in the image and then figures out the best way to get them down to 1024 while preserving the most amount of detail in the image. This last part is critical. There are many different algorithms to resample an image. Usually image handling programs, like IrfanView, or Photoshop, use the best one to preserve details. Some give you a choice, but the default usually works well. Our problem was that we needed to get 3888 pixels down to 1024 pixels. We now know that we need to resample the image to do this. In IrfanView, go to Image > Resize / Resample, or use the keyboard shortcut of Ctrl+R.
Just type in the size to which you want to resample the image in the "Set New Size" box. If "Preserve Aspect Ratio" is left checked on, IrfanView will automatically fill in the other dimension. By resampling the original image file down to a smaller size, we have changed the number of pixels in it. We have gone from a 3888 x 2592 pixel file to a 1024 x 714 pixel file. We have also reduced the size that the file takes up in memory. The original full resolution file was 28.8 megabytes. The resampled file is now just 2.1 megabytes. This technique of resampling is useful for reducing file sizes for display on a web page, or for sending images through email. Note that, of course, when we resample an image file to a smaller size, some information has to be thrown away. The mathematical algorithm that resamples the image does a really good job, but something has to go, and it is spatial resolution.
|
|||||||||
Back | Up | Next |