Thursday, January 5, 2012

Image Resampling, Resizing Pros & Cons

Resource Links
 Link1  Link2

                                                                                                Link1


The Best - Image Resampling                                                                             

Making the most of image resolution through resampling

Tom Arah discovers that the devil is in the detail when you want to make the most of every pixel.

Last month I looked at the issue of bitmap resolution. Unlike scalable vector images, bitmap images are defined as a fixed grid of pixels and so are resolution-dependent. This means that to ensure bitmap image quality you have to ensure that there are enough pixels for your intended target output. For Web output there is a simple one-to-one relationship between each source image pixel and each target screen pixel while for print the complicating factor of halftoning means that you ideally need 300 image pixels per inch for maximum quality output.
This is fine if you know your desired output size and are scanning an original or converting a vector image to a bitmap as you can control the number of pixels as required. In the real world however you don't necessarily know your final output size and are often likely to be dealing with images that have already been digitized. In other words the pixel dimensions are already set and you have to make the most of them. In practice how you go about this tends to split into two camps: resizing images downwards for the Web and upwards for print. As we'll see both processes are intimately related, but it's useful to look at each in turn.
At first sight resizing an image either up or down hardly seems to be an issue. In any photo editor you'll find an Image Size command that lets you change an image's dimensions. As we saw last month, however, changing an image's physical dimensions doesn't necessarily change its pixel dimensions. If the number of pixels remains identical all that is changed is the internal resolution parameter which sets the default size for printing.
Rather than Resizing what we need is to explicitly change the number of pixels in the image, a process called Resampling, or Downsampling in this case as we are reducing size. To do this in Photoshop, you need to select the Resample Image option at the bottom of the Image Size dialog which then lets you change the Width and Height settings to the exact number of pixels required (this can also be set as a percentage of the current dimensions). When you click OK, after some processing, the new smaller version of the image will appear.

An image's pixel dimensions are changed by resampling.
It's worth thinking a bit more about what has happened here. Most users tend to think that this downsizing process is simple and transparent - essentially throwing away the pixels that are no longer needed. If you were halving the image size from 400 x 400 for example you would simply throw away every other pixel. But how would you produce a version of the image with 237 x 237 or 123 x 123 pixels? A little thought though shows that to produce pixel-accurate Web images you need far more flexibility.
Rather than throwing away redundant pixels, the Resampling process actually has to start again from scratch. In effect a new empty bitmap of the desired dimensions is created and the host application then goes back to the original image to work out each of the new pixel's values. In other words you are tearing down the old image and using it to build the new. It's a drastic procedure that shouldn't be undertaken lightly, so only resample when necessary and especially try to avoid multiple resamplings such as those involved in repeatedly resizing an image layer or floating selection.
Resampling is not a simple task and nor is it transparent as its ability to produce arbitrary image sizes means that there can be no one-to-one correspondence between input and output pixels. In fact there are a number of different ways in which the new pixel values can be derived called Interpolation Methods; each of which produces different results and each of which offers its own advantages and disadvantages. I'm going to look at the three main methods as Photoshop presents them from its dropdown list at the bottom of the Image Size dialog but, as these are standards, you'll find them across the board (though often under other names).
The simplest interpolation method is Nearest Neighbour. Essentially the new bitmap grid is overlaid over the original grid and the values of whichever original pixel's co-ordinates is closest to the new target pixel's co-ordinates are used. As well as being much the simplest system in terms of processing, the Nearest Neighbour approach has the immediate advantage that the colours used in the image are unchanged - particularly important when dealing with indexed GIF images where the palette of colours is already limited and fixed.
Sadly the system has just as clear a disadvantage. The co-ordinates of each output pixel are very unlikely to directly overlay an original and within each image some pixels will be a closer match than others. Worse, the way the system works (especially if rotation is also involved for example when you are free transforming a layer) means that while many original pixels are discarded, others may be used more than once. This arbitrary nature of pixel value selection leads to the break up of image features especially angled lines which results in "Stair Stepping" and the dreaded "Jaggies".
When shrinking typical JPEG continuous-tone photographs this probably won't be too noticeable, but with the clearly-defined colours of GIF images it can immediately render the image unusable. In a way this image breakup is unavoidable - with a downsampled screenshot for example, there simply are no longer enough pixels to define legible text. This is why when using screenshots on the Web you should try and use them size-for-size. If you have to use smaller images try cropping them to the point of interest and if you have to downsample, try to use an integer divisor to minimize the damage.
Alternatively you could try another interpolation method. Bilinear resampling also maps target co-ordinates to original co-ordinates but then, rather than simply picking the nearest neighbour, it averages the values of the four surrounding pixels weighted according to their relative distance (you will need to make sure that the image mode isn't Indexed so that the possible colour values aren't fixed). This again has an obvious advantage in that each original pixel's values contribute to the output image so that the arbitrary jaggies are smoothed out to produce anti-aliased lines.

Different interpolation methods produce very different results.
The downsides are just as obvious. To begin with there is the greater processing involved. More to the point Bilinear averaging means that, for a typical continuous tone JPEG photo, every single pixel in the downsized image will have completely different pixel values to those in the original! This is less the case for the typical flat colours of GIF images but here, where different colours meet, rather than a sharp divide there will now be an anti-aliased line where colours blend. As well as introducing often unwelcome softening and blurring this anti-aliasing doesn't suit the GIF compression system and can add enormously to file size.
So far we've concentrated on downsampling for use in Web work. For print work, without the one-to-one image-pixel to screen-pixel mapping, absolutely accurate pixel dimensions aren't essential so manual downsampling is less of an issue. In fact you can usually leave it to your printer driver to automatically downsample your original bitmap especially as it is going to have to do this anyway when it maps the image's pixels to the spots of the halftone screen. The main reason you are likely to want to manually downsample is to avoid unnecessary processing time when editing and printing.
The situation is completely different however when increasing the pixel dimensions of a bitmap image. This Upsampling is a far more common task for the simple reason that many bitmaps, such as web and digital camera images, simply don't contain enough pixel information for their intended print size (remember the 300 dpi rule for press work). Upsampling in Photoshop is done from the same Image Size dialog and works in exactly the same way as downsampling - mapping grid co-ordinates and then determining pixel values - but because new pixels are being added the results are very different.
With Nearest Neighbour interpolation the effect of jaggies becomes even more pronounced when upsampling and, with larger size increases where each input pixel ends up as multiple output pixels, clear blockiness can result - the dreaded Pixelation. Bilinear interpolation comes into its own to prevent this but leads to a new problem. Because Bilinear interpolation works by averaging each of the surrounding four pixels there is a clear smoothing effect and a loss of edge definition and distinguishing detail - exactly the factors that our eyes are programmed to look for in an image. It is this softness and lack of life, along with the rarer pixelation, that are the sure signs that an image is being printed at a size beyond its pixel-based limits.

The sure signs of upsampling are pixilation and/or softness.
So is there a better alternative? The third and final interpolation method that Photoshop offers is called Bicubic and it works by determining a weighted average of the 4 x 4 array of surrounding pixels. Because it is averaging 16 pixels' values, many users assume that it produces the softest results. In fact this isn't the case. The extra pixels and processing time are involved in the calculation to try and work out more precisely how the colour is changing in the area surrounding the new pixel so that a more accurate sample is produced. It's rather like the difference between joining up the points on a curve as straight lines or as a best-fit curve.
Bicubic processing is the most advanced and most accurate interpolation method that Photoshop provides (make sure it's the default setting under Preferences>General) and it's also the system that the vast majority of printer drivers use. It certainly manages to keep more accurate tonal variation and detail than Bilinear processing but still the more you increase the size of your image - and definitely try to keep enlargements to 150% and below - the more the image softens especially around those crucial edges. So is there anything else that can be done to improve an enlarged image's quality and so to increase the limits within which it's possible to effectively resize?
The most obvious solution for a soft image is to sharpen it. Photoshop's fixed Sharpen and Sharpen More filters are relatively crude and work by increasing the tonal difference between adjacent pixels. The Unsharp Mask filter (USM) is a much more useful option as it allows you to limit the effect to only those pixels that differ from surrounding pixels by a Threshold that you can set. USM also allows you to set a customizable sharpening Amount (don't go beyond 200%) and also to set the width of the band of pixels involved in the sharpening effect which is useful for high-resolution print work (still don't go beyond a Radius of 2). USM is undoubtedly a useful tool, but it depends on existing pixel value variation which interpolation by its nature smooths over and so ultimately it's a losing battle.
Any serious quality improvements will have to come at the interpolation stage and there's one very worthwhile trick to know about. More detail can be kept in an image if you don't apply large bicubic enlargements at once but rather in small 10% steps. Obviously this so-called Stair Interpolation seriously increases processing time, but the system can be scripted (visit http://www.fredmiranda.com/SI for presupplied actions) and can also take advantage of Photoshop's 16-bit mode to provide greater room for tonal manoeuvre and so ultimate accuracy.

Stair Interpolation offers the best native Photoshop enlargement.
The benefits of Stair Interpolation are welcome but to improve the quality of bitmap enlargement further it's necessary to look beyond Photoshop. There are a number of image utilities which offer different interpolation methods such as Qimage (http://www.ddisoftware.com/qimage) which offers no less than seven. While some of these seem no better than bicubic processing, the Lanczos method does cut down on aliasing and so manages to keep more edge detail. Of these third-party utilities I particularly like S-Spline (http://www.shortcut.nl) which is dedicated to the single task of enlarging bitmap images and lets you quickly compare the big three interpolation methods against its own. And for high-frequency image types, such as screenshots and cartoons, its S-Spline interpolation method really can make a huge difference.

S-Spline interpolation is good for maintaining high contrast features.
This is the limit as far as interpolation goes - but there are other technologies that promise to go further, even to offer resolution-independence for bitmaps just as there is for vectors. What makes these solutions different is that they first save the bitmap to their own proprietary format. The VFZ file format from Celartem Technology (http://www.celartem.com) for example "converts each RGB color channel from the original image to a 3D vector format. It expresses color distribution information as a distribution component, and color change information as a vector component."

VFZ files promises superior image enlargement based on a vectorised bitmap format.
If you open a sample VFZ file in the proprietary viewer you can view it at six different quality levels. At the lowest level you can see that the effect is rather like a crudely traced vectorized drawing, but at the highest level the image is indistinguishable from the original bitmap. According to Celartem this underlying vectorisation of the image means that it's possible to enlarge images "up to 1200% with no change to original colour shading and no pixilation effect". It sounds promising - especially as VFZ files are lossless and considerably smaller than the original bitmap - but sadly in practice its enlargement results seem soft and no better than bicubic processing.
Ultimately I'm not convinced that vectors are well suited to storing bitmap information where each pixel can vary arbitrarily from its neighbours. So is that the end of the road? Not quite. There is another advanced file format that promises more than the standard grid-based bitmap. LizardTech http://www.lizardtech.com doesn't give a lot away about how its "Genuine Fractals" system works apart from to say that based on "proprietary mathematical algorithms" it "replaces the pixels of the image with a new mathematically based file format". Reading between the lines, the fact that fractals are patterns that repeat on smaller and larger scales might give some indication of what's going on.
In practice, the Genuine Fractal system has an immediate advantage as it fits in well with professional imaging workflows by acting as a Photoshop plug-in. Once installed, a new option becomes available from the Save dialog that lets you save any open bitmap (though only single layered) to the highly compressed STN file format. To enlarge the image you simply open your STN file and a dialog appears in which you can set the desired pixel dimensions or an enlargement percentage. Click on OK and after some considerable processing your enlarged image appears.

Genuine Fractals technology manages to maintain edge detail that bicubic processing loses.
The obvious question is does it work? And the simple answer is yes - amazingly well. For enlargements of 200% or more where bicubic interpolation produces a soft mush, the Genuine Fractals image maintains a far greater degree of edge detail and so life in the image - a fact that is often even more apparent in print than onscreen. In particular, whereas low contrast continuous tone features like sky, clouds and skin benefit little, stronger features such as eyes and text maintain much more of their distinguishing edges and detail.
So is this the promised holy grail of resolution-independence for bitmaps? Sadly that is going too far. To begin with the enlargements produced with Genuine Fractals aren't perfect with some JPEG-style artifacting and ghosting around edges (this also means that other approaches such as Stair and S-Spline interpolation sometimes produce better results especially for high frequency images). More to the point, it's crucial to realize that Genuine Fractals can't produce magic. If it wasn't there in the original scan or digital photo, it's not going to appear when you enlarge it. You can't add detail that isn't already there.
All the resampling strategies that we have looked at are exercises in damage limitation. Some are surprisingly powerful and so excellent additions to your toolkit, but ultimately the best policy is to make sure that you have the right number of pixels from the start - and to avoid resampling altogether.

Tom Arah

May 2002









Hopefully you've found the information you were looking for

Link2

A Photographer’s Guide to Image Sizing

By Dave Ryan, February, 2006
How big is my photo, or how big can I make it? Sounds like a simple enough question, but it’s among the most frequently asked questions by those new to digital imaging. And when the answer starts coming in terms of megapixels, megabytes and pixels per inch(ppi) it can leave the newcomer wondering why it all has to be so complicated. With film it was easy, you can hold a slide or negative in your hand and see just how big it is. With a little experience you can figure out how far you can stretch that 35mm or medium format image with an enlarger without losing too much quality. Why does it have to be so difficult with digital? Unfortunately one outcome of the complexity of pixels and bytes is to adopt generalized rules and half truths to try to cope with the information overload. When your webmaster throws out something like “send me the image at 72dpi” you’re getting a rote answer and only half the equation but it’s an increasingly common way that folks strive to tame the subject of digital image size with simple answers. So how big is your photo? Is there a way to relate all those megapixels and megabytes?

Pixel dimensions and Native Image Size

One way to describe the size of a digital image is to count up the pixels in the horizontal and vertical directions. Say you take a photo with your Nikon D70s in JPEG Fine mode. Straight out of the camera you’ll get an image with 3008 pixels in the horizontal direction and 2000 pixels in the vertical direction. Multiply them and you’ve got the infamous megapixels that the marketing folks like to bombard us with. In the case of the D70s 3008 multiplied by 2000 is a tad over 6 million pixels or 6 megapixels in the jargon. These are the native dimensions or native resolution of your digital image. In other words this is the image info straight out of your camera before any cropping or resizing. I’m not shy about resizing my images, but you’ll never beat the quality of the image at its native resolution so it’s a good starting point for talking about image sizes.

Last things first, start by understanding your output device

This might sound crazy, but when we talk about the size of a digital image it all depends on what we’re going to do with it. The same image takes on an entirely different size when sent to a photo quality printer than it does on your computer monitor. Even sending it to different monitors can change its size dramatically. How can the exact same image change its physical dimensions just by sending it to different devices? Well it all depends on the output resolution of the device you’re using to reproduce your photo. Sometimes you can alter that resolution, sometimes you just have to take what’s given to you but understanding output resolution is the first step to understanding image size.
This Nikon D2x image had  pixel dimensions of  4288x2848 straight out of the camera. 
But what does that mean in real world terms?

Monitor settings and pixels

In the simplest sense a monitor’s job is to display a grid of colored dots called pixels on your screen. The color and brightness of each pixel can be individually set to reproduce photorealistic images. But the number of pixels is fixed according to your computer’s hardware and system preferences settings. Depending on the make and model of your computer’s monitor, the type of graphics card installed in your computer and the specific settings in your computer’s control panel your monitor will be able to reproduce a limited number of pixels on your screen. Typical screen resolutions include: 800x600, 1024x768, 1280x1024, and 1600x1200. These numbers refer to the number of pixels displayed in the horizontal and vertical directions accordingly. Even though the Display>Settings screen in Window’s (Macs have a similar screen) calls this “Screen Resolution” technically it’s just the number of pixels that your monitor will display in each direction. So how do you get from those monitor pixel dimensions listed above to actual screen resolution?

Translating pixel dimensions to screen resolution

To get the actual resolution you also have to know the physical screen size in inches. To further complicate things the screen dimensions we’re interested in are the actual horizontal and vertical size in inches not the 17”, 19” or other diagonal measurements that are used to sell monitors. For instance the monitor I’m using at the moment has a viewable display size of approximately 12.5”x9.5”. My “Screen Resolution” setting in the Window’s control panel is set to 1024x768 pixels. Dividing the pixel dimensions by the screen size in inches and rounding just a bit I get a screen resolution of 81 ppi(pixels per inch sometimes called dots per inch or dpi). My laptop screen is a bit smaller and the graphics adapter is set to a higher mode so its resolution is approximately 94 ppi. I work with some very nice 20” Apple Cinema displays and they’re set to approximately 98 ppi. So we’ve done a bit of arithmetic, big deal, how do you use this information?

Digital photo sizes on a monitor

So you’ve got an image you want to display, let’s say one of those native D70s photos discussed above which gives you 3008x2000 pixels to display on your screen. If I viewed that on the screen I’m working on with its 81 ppi resolution I’d get an image that’s approximately 37”x25”. If I viewed it on one of the 20” Apple Cinema displays I use it would be approximately 31”x20” at the 98 ppi resolution of those screens. Well these monitors just aren’t nearly that big so unless I use some on the fly resizing software like Window’s jpegfile for viewing most of my image wouldn’t fit on the screen. How am I coming up with these numbers, easy take the image’s horizontal and vertical dimensions and divide them by the screen resolution in ppi. In other words 3008 divided by 81 gives me approximately 37” and 2000 divided by 81 gives me approximately 25”.  Luckily you don’t actually have to do the math, there are nice image sizing tools in your image editor that take care of that part but it’s all based on dividing the image dimensions in pixels by the pixel spacing of your output device.

So what about 72 dpi

Once upon a time a lot of folks used smaller monitors set to display 800x600 pixels. A lot(but not all) of these gave you a screen resolution of 72 dpi. Enough in fact that 72 dpi became the assumed standard for all web and monitor display use and was dubbed low res (pronounced rez) for low resolution output. It was a convenient approximation of folk’s monitor settings then but a total myth today in the era of high resolution graphics cards and big monitors. But the myth persists and more than one web master has insisted on images at 72 dpi. A better way of describing images destined for web and email use would be to define them in terms of their actual pixel dimensions for instance asking for a 400x600 image. If someone simply asks you for a 72 dpi image, without any qualifiers then you’ve got to ask yourself what the reasonable image dimensions are for the intended use. For instance if you think your image will be used as a 2”x3” image on a web site then multiply that by the 72 dpi requested and give them an image with pixel dimensions of 144x216. Better yet round it up a bit to account for larger monitors say to 200x300. Entering the requested resolution and your intended size in inches will give you what you want from most image editing programs. I always try to keep clients happy and give them what they ask for in terms of dpi settings but in the end it really doesn’t matter for web images.

Cut to the chase and think in pixel dimensions for screen use

When you get right down to it that resolution tag that is embedded with your image file just doesn’t matter for web and email use. Your web browser doesn’t open up the file and look at that information and as I’ve said real world monitors are all over the map in terms of their actual screen resolution. For web use the only thing that really counts is the actual image dimensions in pixels. Getting back to the D70s example, if you try to display its native 3008x2000 pixel file on a 1024x768 screen it’s easy to see the image won’t fit. Most web browsers will handle the downsizing necessary to display that image but you often get problems such as straight lines that get jaggy or overly soft images and you’ll be sending an unnecessarily large file out over the web slowing things down a lot. You can avoid the resolution math and simply supply images that easily fit within common screen dimensions.

If you want your images to be universally viewable without resizing then make sure they fit within the 800x600 limits of older screens. Don’t forget that web browser borders and email in-boxes take up some of that screen real estate as well. If you really want aunt Margaret to be able to see your photo within her email window and without launching an external image viewer then you’d better limit your image height to a few hundred pixels unless you know she sports a nice big graphics monitor operating in a high resolution mode. Ever receive an email with an attached photo only to see a huge zoomed in view of your friend’s new baby?  Sure you see the tip of their nose but have to scroll around or launch an external viewer to see the rest of the photo.  That’s what happens when folks don’t grasp how images are displayed on monitors.  A common guideline for posting web images is to limit the largest dimension to 600 pixels. Yep this will display at different sizes depending on the monitor used to view it but it will be fairly large and fit comfortably on all but the oldest monitors and even then the resizing will be minimal. By thinking in terms of pixel dimensions when working for web and email output you can save yourself a lot of mental gymnastics and quickly arrive at an appropriate image size. The bottom line is that monitors vary so pick a common size like 1024x768, allow for some pixels lost to borders and size your image to fit comfortably within those limits.
Sized to 600 pixels in width this image fits nicely into my browser.  It takes up a bit more than half width of my monitor.  How does it fit on yours?  By the way I saved it with the resolution set the ridiculous value of 1000 ppi notice any difference? I didn’t think so.

But how big will my prints be?

Unlike monitors, typical high quality print resolutions range from 180 ppi on the low end to 360 ppi  for professional quality results. Another big difference is that these print resolutions aren’t fixed in the printer the way they are in a monitor. You can take the same file and send it to the printer at any resolution setting you choose. Basically when you do this you’re telling the printer how far apart to place the individual pixels on the printed page. Place them too far apart and your image will take on a blocky digitized look. Place them unnecessarily close like 720 dpi and you’ll be limited to a very small print with no added quality. Remember that resolution tag that was ignored for web use?  Well it’s exactly how we control printing resolution for hard copy output so we can’t ignore it any longer. Unlike your web browser, your printing program looks at the resolution tag and uses the value you enter there to control the printer itself.

A word about printer resolutions

When we buy photo quality printers we see advertised resolutions like 1440 dpi not the measly 300 ppi described above.  Remember that color printers create their wide range of photo quality colors by placing tiny droplets of different ink colors down to create all their combinations of color and brightness. A big number like 1440 dpi is a good thing in a high quality printer, but it’s not the resolution you care about when sending a file to the printer.  There are a lot of terminology debates raging in the photo world but one deals with dpi vs. ppi vs. other ways to describe resolution.  I use the term dpi to describe actual droplets of ink like the 2880x1440 micro droplets of ink placed on the page by my Epson printer or in the places where it’s just historical convention like 72 dpi.  I use the term ppi to describe the much larger pixels displayed on a screen or sent to the printer.  Others use these terms differently.  Just remember that a pixel is the smallest piece of color and tone information in a digital image but a photo quality printer uses a whole bunch of tiny droplets of ink to synthesize each pixel on the printed page.

Using print resolution to control print sizes

So now you’ve got some control on your sizing your prints by adjusting the resolution setting. But what are the tradeoffs? Take that same native D70s file at 3008x2000 pixels and print it at 300 ppi and you’ll get a 10”x6.67” print. Print it at 240 ppi and the same file gives you a 12.5”x8.33” print and at 180 ppi you’ll get a whopping 16.7”x11.1” print. All from the same native file without any image resizing. Of course there’s no free lunch, as you print at lower resolutions you’ll eventually reach the point where the individual pixels are spread too far apart on the page and your image will suffer. How far can you push the resolution to get big prints? Well that’s up to you and depends on your printer, the paper and inks you use and your own quality standards. There’s no absolute here, but many folks consider 300 ppi the gold standard for high quality output on modern ink jet photo printers. It’s such a common high quality setting that it’s earned the name high res and is a standard image resolution in the publishing industry. Some printers work better at 360 ppi and the folks that set their file resolutions that high insist they can see the subtle differences. Personally I’ve had very good luck printing files at 240 ppi. It doesn’t work for every image but if I need a large print I’ll usually try a proof at 240 ppi before I resort to enlarging my image in PS. If the proof shows pixilation or the telltale stripes known as banding I’ll upsize to 300 ppi and print another proof. I’ve tested lower print resolutions and have found 240 ppi to be the low end for most of my work. Exceptions include printing on rough matte card stock or images destined for newsprint that can tolerate lower resolution settings. Your results may vary so take some time to print a couple of test images on the different papers you use and at different resolution settings. A few tests with crops from well shot images should tell you how far you can push your image sizing through resolution alone.  I like to stick to resolutions that scale nicely to the 1440 dpi that my printer is capable of like 180, 240, 288 and 360 but always send out work destined for print at the industry standard 300 ppi since I don’t know what print process they’ll use and like to give clients what they’ve asked for.

How do I get even bigger prints?

When dropping your print resolution isn’t an option or you’ve dropped it far as you’re willing to go it’s time to upsize your image in PS or some other image editing program. I always teach upsizing images as a two step procedure in my PS workshops. You can do this as a single step in most image editors, but I think the two step approach helps you see exactly what you’re doing and helps you understand how far you’re attempting to push your image.
  • The first step is to simply choose your print size and see how much your resolution drops. I do this in the PS Image Size dialog by unchecking the Resample Image checkbox at the bottom of the dialog box. With resampling disabled I enter the desired print dimensions. Unless you want the funhouse hall of mirrors effect it’s best to leave the Constrain Proportions box checked and enter only the height or width. Whichever you change the other dimension will change proportionally. If you enter larger dimensions the Resolution field will drop accordingly. Say you take that same old 3008x2000 image from its native 10”x6.7” at 300 ppi and enter 20” in the width field. The height will change to 13.4” and the resolution will drop to 150 ppi. All we’ve done at this point is told the printer how big an image we want. The print dialog has responded by telling us how far apart the native pixels have to be placed to make this happen. Well from my tests I know I won’t be happy with a high quality glossy print at 150 ppi so I’ve got to take another step.
  • With the pixels spread so far apart on the page we’ll start seeing the individual dots that make up the image so we’ve got to fill in the spaces. This process of filling in the voids with estimates of what would have been there if we’d started with a higher resolution file (say from a 24 Mpixel film scan instead of a 6 Mpixel D70s) is called interpolation. It’s just a term from statistics that means estimating and filling in the missing data between known data points. To interpolate in PS we check the Resample Image checkbox and enter our desired print resolution. You’ve got several choices in terms of the math used to do the interpolation. The three best choices in the current generation of PS products are Bicubic, Bicubic Smoother and Bicubic Sharper. Each of these uses a sophisticated curve fitting technique and uses pixels to the left right, above and below the gaps between your native pixels to estimate and fill in the blanks. Bicubic is a great option for moderate resizing say up to 50% larger or smaller. For aggressive upsizing the Bicubic Smoother option reduces the blocky look that often results from digital enlargements. When doing dramatic downsizing, for instance when preparing images for the web, the Bicubic Sharper option reduces the edge softening that comes from throwing away image information.
Photoshop’s interpolation options and those of dedicated resizing programs like Genuine Fractals are very sophisticated but they can’t create image information that simply wasn’t there. The illusion of missing data created by interpolation is very convincing and I don’t hesitate to double or even triple the size of well shot images but there are limits to how far you can push this. Again it’s up to your own sense of quality and you’ll have to experiment to find out how much interpolation you’re happy performing. If your image is destined for an art gallery you’ll probably limit yourself to minimal interpolation but you might feel comfortable printing posters from images that were originally 20% or less of the final poster size.
Screen Photoshop’s Image Size dialog box makes it easy to resize your photos for print or web use by taking care of the resolution math.  By unchecking the Resample Image box you can use it as a what if… calculator to see what size prints you can get at different print resolutions without changing the native pixel dimensions of your image.
With practice you can just go into the image dialog box, leave the Resample Image box checked and enter your new print size and resolution but I think it’s best to start with the two step approach. For one thing it reinforces the idea that your image sizing occurs when you spread the native pixels apart on the paper. It also helps you to recognize when you’re asking too much. If for instance you start with an image you received in an email with pixel dimensions of 400x600 and want to print an 8”x12” print you’ll find out quickly that you’re asking a lot. At your desired 8”x12” dimensions your resolution drops to a paltry 50 ppi. The 6x interpolation it takes to get that up to 300 ppi is asking a lot and doing your resizing in two discrete steps makes this very clear. With a bit of practice you’ll get a feel for how far you can stretch images based on their native pixel dimensions and then you can jump right in and do the resizing in a single step.

Moving to Megabytes

Pixel dimensions might be the best way to describe the content of an image file, but when it comes to storing them on your disk or understanding how much RAM you need to edit them in PS it’s helpful to think of file sizes in Megabytes(MB). With practice you start associating file sizes in MB to print sizes. I know I can get a good 8”x10” print out of a well shot JPEG that opens to 17 MB or more in PS. But all MB are not created equal. You’ve got to specify whether you’re talking about the file size while opened in your image editor or the size of the file saved on your hard disk or CF card. The two versions of file size in MB can vary substantially depending on the file format used to save your image.

How many bytes to the pixel?

If you’re talking about the size of a file opened in an image editing program it’s easy to convert Megapixels to Megabytes. For instance, an image shot in 8 bit RGB mode has 8 bits of red, 8 bits of green and 8 bits of blue information for every pixel. In computer parlance 8 bits equals one byte which gives you 3 bytes of data for each image pixel. So a camera with roughly 6 million pixels like the D70s creates images with roughly 18 million bytes of image data. Sure there’s a bit more information stored in the file including your shooting info but the image itself has approximately 18 million bytes of data. But we’re talking about computers here and there’s another tiny twist. While scientists and engineers define a Mega as a million of something, computer programmers define a Megabyte as 1,048,576 bytes. It’s because computer folks work in the binary numbering system and their definition of Mega fits nicely into that system. So PS tells us that our 18 million pixel D70s file is actually just over 17 Megabytes. In other words for an 8 bit RGB file you can get from Megapixels to Megabytes by multiplying by 3 and then taking 95% of the result. If you’re working with 16 bit files you just double your results since each color is now described by 2 bytes of data. So the size of your file while opened in an image editor is pretty straight forward, but how much room will that same file take up on your disk drive?

Sizes of saved image files

The size of an image file saved on your disk can vary widely depending on the file format you use for saving, the quality settings you use while saving and the content of the image itself. An uncompressed Tiff will take up as much room on your disk as the open file did in your editor. Save that same Tiff with lossless LZW compression and the saved file can easily drop to a quarter of its open size with no quality loss. Save it as a maximum quality JPEG and it can drop to ten percent of its open size depending on the image and saved as a minimum quality JPEG it can drop to less than one percent of its open size. So you’ve got to be careful estimating image sizes based on the saved file size. But those sizes on disk can give you some clues. If you’re handed a JPEG that takes up a couple of hundred kilobytes and it opens to a 17 MB file then you can be sure it’s undergone some heavy handed JPEG compression. Zoom in to 100% and take a careful look at areas of smooth detail like blue skies or blurred backgrounds. Even odds you’ll find blocky compression artifacts instead of the smooth tonal transitions that you might have found in the original.

So how big is my digital image?

In the end one could argue that a digital image is only as big as its pixel dimensions. Trouble is we live in the physical world and are more interested in whether it’s a 4”x5” or an 8”x10” than how many pixels it holds.  If our output was always to print or always for web use it would be easy but these days photographers routinely print an image at several sizes and downsize copies of the same image for web use.  Keeping a handle on the native resolution of your image and the resolution of your output devices is the key to intelligent image resizing.  With so many image sizing options only a mouse click away it’s easy to go overboard.  As sophisticated as modern resizing tools have become you’ve got to remember that upsizing or downsizing an image will never create detail that didn’t exist in your native image and that just like enlarging film in the darkroom there are limits to how far you can stretch your photos.  Are there rules for this stuff?  Nope, you’re still in charge of your images and your artistic vision.  Don’t believe it when someone tells you that any interpolation ruins an image but be equally suspicious of claims that such and such software allows huge increases in image size with no quality loss.  In the end they’re your images and you’ve got to decide what resolution you like to use for printing and how far you’re willing to stretch an image.
--Dave Ryan for nikondigital.org
About Dave Ryan: Dave is a photographer, photo instructor and mountain guide in Jackson Hole, Wyoming. He sells greeting cards as well as stock photographs of action sports, wildlife and landscapes. He views digital photography as the ideal merging of his love for photography and his career as an electronics engineer specializing in digital signal processing systems. He is a regular contributor to the forums here on nikondigital.org

I hope this Info is some how useful, that si gathered after lot of googling,
All the Best and Regards
Author

No comments:

Post a Comment

Your valuable feedback is always welcomed.

Followers