Friday, October 21, 2011

Quick tutorial: Re-sizing an image (in a sort of right way) using gimp

In this quick tutorial I show different ways to upscale an image an how to do it using gimp. 

Last Wednesday I watched a presentation from Israeli presentation designer Jan Schultink where among other things, he talked about avoiding stretch images. You might know this case. You have a small image and want to make it bigger, so you pull the image handles but the image's proportions are not kept constant.

To re-size an image keeping its proportions constant, press the Shift key and drag the handles.

However you should not up-size an image. As a good practice, always use images that have at least the size height or width of your canvas (typically 1024×768). If you want to size the image in it full size and still it is some pixels short, you can use a black background to make it appear full size.

Sometimes good practices are not real practices and you might yourself forced to use an up-sized image.  Something like this (click below to see in original size and see the resulting effect).  Sloppy up-sizing  can lead to pixelized image. 
The image to the left is what you want, a good looking image. In this case the image is 500×500px.   But instead what you find as a smaller one 75×75px (bottom right). After correctly up-sizing the result is the pixelized image on the right hand side. Source: Flick-r
There is a way to improve the result of this re-sizing. Actually, if you up-size inside Keynote, you'll get quite a good result.  

Left: Original Image. Right: Upsized image with Keynote


However, you could do much better if you re-size an with a image manipulating program like Photoshop or GIMP. In GIMP there are 4 different move to scale an image: None. Linear, Cubic, and Sinc. The Figure below shows the different results (Click to see in original size).



Up-scaling an image in GIMP. From left to right: Original, none, linear, cubic and sinc
In case you wonder, linear, cubic and sinc refer to the way the missing pixels are calculated  i.e., interpolated. As you can see, a GIMP cubic up-scale interpolation methods yields better results than the up-scale with Keynote.

The quality of the re-sizing depends on the image itself. So it is better to test the different interpolation methods. Case in point, take a look at the image below

Up-scaling an image in GIMP. From left to right: Original, none, linear, cubic and sinc. Source: Flick-r
While in the bacteria example the cubic method worked better than the linear one, in the building one, either one produces a similar result.

My advice is to quicking scale in the image using the all  interpolation methods and decide what works better. This brings me to the tutorial.

1. Open the image in GIMP. Recently I discover the opening a image in a layer gives more flexibility.
Source: Flick-r




















2. Open the layer Dialog box by pressing Ctrl+L.

3. Duplicate the image 3 times by clicking on o the duplicate layer open (fourth buttom from left to right).













4.0 Select a new layer by clicking on it.

4.1 Open the Scale Layer dialog box. Layer Menu > Scale Layer

















4.2. Scale to the require size and choose a  different interpolation method.

















4.3. (Optional good practice) Double click on the layer and rename to the interpolation method you just applied.

5. Repeat from 4.0 to 4.3 until you have applied all the interpolation methods.

6. On the layer dialog press and hold the Shift key and click on the eye  an layer to close the others. Move through the all the layers and  decide what works better.

No comments:

Post a Comment