Main page
List of articles

Adding new pixels to a picture
An inexact comparison of several approaches to resampling

High quality prints should be made at 300 dpi. In other words, we must have a picture with dimensions of at least 1200 x 1800 pixels, if we need a high quality print as large as 4 by 6 inches. For bigger prints we must have more pixels. This is a formal requirement. However, there is often necessity and/or wish to print large images based on insufficient number of pixels.

Sometimes the solution can be simple. The 300 dpi resolution implies that the final image is seen from the distance of approximately one foot (ca. 30 cm). Of course, in some cases viewers are not intended to be that close to a picture. For distant viewers the 300 dpi value can be proportionally reduced.

Still the question remains — what should we do, if we want to have a large picture based on a relatively small number of pixels and look at it from a close distance? There may be only one solution to this — we have to increase the number of pixels in our image. Of course, adding new pixels to our picture cannot create small details. The purposes of this procedure is different:

— we must create smooth contours in our picture;
— brightness and colour should also change smoothly;
— sharpness of objects must be preserved.


How to paint new pixels?

You may add new pixels to your images with the help of any reputable image processor such as Adobe® Photoshop® and others. The details of this procedure are described in corresponding manuals. Here I would like to discuss the results.

Let us take the test pattern 3 x 3 (see the first block of pictures below) and increase it to a 6 x 6 square. In this case, we will have three new pixels per initial pixel. The question is — how to paint new blank pixels? If we paint them the same color as the initial pixel, we will simply make our pixels larger (this procedure is done by the RESIZE (RESAMPLE, NEAREST NEIGHBOUR) function in Photoshop). As a result, edges will stop being smooth any longer. Some jagged effects will be distinctly seen in our picture. Smoothness of colors will also be lost. Thus, it is not the best solution, provided we still intend to look at our picture from a close distance.

To cope with the situation, we will have to apply a sofisticated algorithm of resampling. Let us have a look at the results that are produced by some popular resampling filters.
I admit the 3x3 square is too small for correct experiments. Still it allows us to understand the general idea. Further results that are based on a real image will follow.

The bicubic interpolation from Photoshop uses several intermediary colors to paint new pixels. As a result, smoothness of both curves and colors will be preserved. Moreover, the resulting image is going to be quite sharp.

The pictures above demonstrate that both Mitchel Filter and B-Spline Filter that can be found in Irfan View, a free image viewing program, produce excessively smooth pictures. In some cases, those can be useful instruments, but those filters cannot be applied, when sharpness does matter.

A good trade-off can be reached with the help of Lanczos Filter from the same image viewer. This filter both preserves sharpness and produces many intermediary gradations of color.

Another interesting solution to our problem is the Genuine Fractals™ plug-in for Photoshop. On the one hand, this algorithm broke axial symmetry in our test image. (It was the only filter that showed such a strange behaviour in my experiments.) On the other hand, this plug-in solves the problem in its own way. I do not like categorical statements. Thus I would say that instrument seems to outperform the others in some cases. At the same time I believe Genuine Fractals™ is not a universal tool to be used in all possible cases.


Minitest based on a real image

Now let us apply all those filters to a real photograph. For my experiments I selected a picture of a roof with many architectural details. It also shows a fragment of sky with many gradations of blue.

Before carrying out my experiments, I reduced twofold the linear dimensions of the original picture. Then I tried to restore the size of the photograph with the help of different resampling tools. The results are shown below. (Mitchel Filter and B-Spline Filter produce very close images. Because of that, I show only one of the two similar pictures here.)

The simple Resize algorithm produce distinct jagged contours. The result can be considered satisfactory only if the distance between the picture and a viewer is going to be proportionally larger.

Bicubic Interpolation is a good performer. It cannot restore lost details, of course. But no jagged contours can be seen in this case. Gradations of color are also shown satisfactorily.

The B-Spline filter blurred the picture, which agree with our expectations. Thus, it cannot be recommended as a general-purpose resampling instrument.

Both Lanczos Filter and Genuine Fractals™ demonstrated very convincing results. Both of them are good instruments. Which one is better? To what extent do they outperform bicubic interpolation? It is up to you to decide.


Conclusions (or recommendations, to be more correct)

The above minitest cannot be a source of comprehensive information. It just serves to give you some general ideas. The following recommendations were supposed to be a good starting point for your own experiments.

1. If a picture is going to be watched from distance, the simplest Resize algorithm (without interpolation) will do.

2. If a picture is intended to be seen by close watchers, bicubic interpolation will work perfectly in 70 per cent cases.

3. In those rare cases when bicubic interpolation fails to do the job, try Lanczos Filter. It is both free and very effective.

4. When none of the above solves the problem, try complex algorithms such as Genuine Fractals™ and many others. Complex instruments, both freeware and payware, sometimes can produce unique results. But, in my opinion, they should not be used on a regular basis. I believe only specific tasks require specific approaches.

5. My recommendations are valid when dimensions are increased less than twofold (four-fold in area terms). In my opinion, significant enlargement of pictures makes sense, only if the final image is going to be watched from large distances.

6. Very often, filters with the same name work differently in different programs. You may like a filter in a certain software package, and dislike the filter with the same name in other programs.

* * *


1. Lanczos Filter can be found in IrfanView (, a free image viewing software.
2. Genuine Fractals™ can be downloaded from the LizardTech website .


Main page
List of articles - рейтинг фоторесурсов

© Igor Yefremov, 2003, all rights reserved

You must obtain a written permission from me to use any materials of this site for any commercial or non-commercial purposes, unless there is an explicit statement to the contrary.

Hosted by uCoz