Digital image resizing with the GIMP

Short URL:


Processing digital images is a very common task today. Image processing tools are so common that users often process images by trial and error, without really knowing what they are doing. One of the operations people fail most commonly is resizing an image.

In this article I will explain how to resize images. This is a way for me to celebrate 10 years since I started studying digital image processing!


There are plenty of digital image formats out there. Each of them provide common or unique features. The most common formats, such as TIFF (Tagged Image File Format), JPEG (Joint Photographic Experts Group), PNG (Portable Network Graphics), are defined raster formats, as they represent the image as a matrix. Each matrix entry is called a pixel (picture element) and represents a color (also called light frequency). These images are commonly known as intensity images.

There are other types of raster images, such as:

  • range images, where colors represent the distance between the object and the sensor (usually white pixels represent surfaces that are nearer to the observer and black ones represent surfaces that are the furthest away);
  • thermal images, where colors represent temperatures;
  • acoustic images, where colors represent the acoustic reflectance.

You also have vector images, where the represented scene is not a matrix of pixels, but is instead described by formulas instead. Examples of such formats are SVG (Scalable Vector Graphics) and EPS (Encapsulated PostScript). They are usually used to store technical drawings, plots and camera-ready documents.

The resolution indicates how close each pixel is to the others

The advantage of a vector image over the raster is that it can be scaled (in or out) without loss of quality. However, vector images can’t efficiently store complex images such as photographs.

In this article I’ll focus on raster images, and I’ll explain how to resize them with the GIMP [1]. Keep in mind that you can usually open a vector image with the GIMP, which will rasterize the input image before showing it. You can also read more on image formats in [2].

Images, pixels, resolution

Open the GIMP and create a new image typing Ctrl + n (that means “hold the ‘Ctrl’ key and type ‘n’") or by choosing New from the File menu. You’ll be given the window in figure 1.

Figure 1: The GIMP’s window in which you enter the data to create a new imageFigure 1: The GIMP’s window in which you enter the data to create a new image

You are asked to enter the image size; this information is expressed in pixels by default. A summary tells you that the image resolution is 72 dpi (or “dots per inch"—I’ll talk about this more in a moment). You can also edit the advanced features to change the resolution, and other information I won’t talk about here.

Once you have created the image, you can see how big it is exactly in inches or centimeters, because you know the image’s resolution which is expressed in dots per inch (dpi) or in dots per centimeter (dpcm). This piece of information tells you how many pixels will make up each inch or centimeter.

Consider, for example, a 512 x 512 pixel image. The so-called print size is calculated using the following formula: size = pixels / resolution. So, since 512 / 72 = 7.11, the considered image is 7.11 x 7.11 square inches (or in²) at 72 dpi (on an output device like a monitor), and 1.71 x 1.71in² at 300 dpi (on an output device like a common printer). Of course, GIMP and similar programs will take into account the image resolution, and will show the image accordingly, regardless of the output device’s resolution.

GIMP and similar programs will take into account the image resolution, and will show the image accordingly, regardless of the output device’s resolution

You can also enter image size in other unit measures, as humans are more experienced with centimeters or inches than with pixels.

You now know how to create an image of the right size from scratch. However, you will often work on third party images: digital pictures, scanned documents, screen shots, and so on. Opening such an image is straightforward: either type Ctrl + o or select File→Open.

Lossless resize

If you’ve just opened an image to work on, at the top of the image’s window, in the title bar, you can see the image’s size in pixels. To find out more, you have to select View→Info Window (or Shift + Ctrl + i). The info window provides you the dimensions in pixels and the resolution, along with the print size.

If you have an image that is 2775 x 3525 pixels, stored at 72 dpi, the info window would tell you that it is about 38 x 48in². How can you make it smaller? Select Image→Scale Image to get the window shown in figure 2.

Figure 2: The window that the GIMP provides to let you resize the current imageFigure 2: The window that the GIMP provides to let you resize the current image

Change the X resolution value to 300 pixels/in (pixels/in is another way to say dpi). As soon as you enter the value, the corresponding Y resolution value will change to 300. This happens because the chain next to the resolution values is “locked" (in which case, the same dpi will be kept for the image’s height and width). If you “unlock" the chain, you will be able to change each of the resolutions separately. To apply the resize just click on Scale.

Look now at the info window: you can see that the print size is 9.25 x 11.75in². You resized the image by putting the same amount of pixels in a smaller area. This means that you’re not losing information, and the image file remains substantially untouched in its byte count (how much space it will take on disk).

If you want to change the image’s file size you need to change the number of pixels

If you decrease the resolution, the pixels will be rendered bigger and the resulting image will also be larger. Because of the rendering, the final image’s quality will be slightly worse.

In figure 3, I show a real example: FSM’s cover. Though both the images are 2775 x 3525 pixel, the left one is 300 dpi and fits a U.S. letter page (i.e., 8.5 x 11.0in²), once trimmed 0.375in per side. The right one is larger (72 dpi), so a U.S. letter page shows only a small portion of the whole image.

Figure 3: FSM’s cover image, rendered at 300 dpi (left) and 72 dpi (right), as included in a U.S. letter pageFigure 3: FSM’s cover image, rendered at 300 dpi (left) and 72 dpi (right), as included in a U.S. letter page

Lossy resize

If you want to change the image’s file size, you need to change the number of pixels. This kind of change determines an information change: a loss of detail if you decrease the number of pixels; or an arbitrary addition of pixels, or interpolation, if you increase them. You have to decide if such changes are a good trade-off between file size and image intelligibility.

An operation I perform very frequently for FSM (see textbox 1) is resizing FSM’s covers and ad images. I make them low resolution following a simple procedure: the new image will have the same print size as the original, but a lower resolution. So the new pixel dimension is determined with formula 1.

Formula 1: the simple way to calculate how many pixels the resized images will haveFormula 1: the simple way to calculate how many pixels the resized images will have

I fixed medium resolution to be 200 dpi, and low resolution to be 72 dpi. Of course, what “high", “medium" and “low" mean depends on you. For instance, images for a web site could be considered high resolution at 72 dpi, medium resolution at 60 dpi, low resolution at 48 dpi, since a web site is mainly viewed on a computer screen.

Textbox 1: How FSM provides small downloadable PDFs

Once in a while, one of our readers ask me how we manage to stuff the whole magazine (including the cover and the ads!) in a 5MB PDF file.

You might have noticed that the PDF available to our subscribers isn’t good enough to be professionally printed, since the image quality is too low for a printing house. Well, it’s as simple as that!

Our typesetting system is based on a real programming language. So I was able to write a wrapper command to embed the right image in the final PDF. To typeset the downloadable magazine, the wrapper is programmed to include low resolution cover, ads and images. The images are preprocessed the way I described in the section “Lossy resize".

It’s now time to lossy resize images. Considering FSM cover: as I said, I want it to have the same print size (i.e., 9.25 x 11.75in²) but at 72 dpi resolution. So, using formula 1, I get X = 2775x72/300 → X = 666; Y = 3525x72/300 → Y = 846. So, 666, 846 and 72 are the figures I have to input in figure 2’s window, to replace the pixel size and the resolution. The resulting image will be print-sized as the original.

You’re not forced to apply formula 1 every time you resize an image. You are free to enter the figures you like, and experiment to find the results that suit you best.

What you might have realized by looking at my example, is that the resulting image has less pixels than the original. This means that it has less information, and thus it’s not as defined. A similar consideration applies when you increase the number of pixels, and, hence, add information (the program has to add “extra" pixels). This leads to the creation of artifacts. In figure 4 I show an example of both the cases.

Figure 4: the center image (the original) is reduced (left image) and enlarged (right image) multiplying and dividing by 4 its number of pixels. The result is clear: the callouts are hardly readable on the left, and look “awkwardFigure 4: the center image (the original) is reduced (left image) and enlarged (right image) multiplying and dividing by 4 its number of pixels. The result is clear: the callouts are hardly readable on the left, and look “awkward" on the right with their blue halos


In this article I explained how to use the GIMP to resize images. Now you can see that there's a lot more to resizing images than you probably thought!

You are strongly advised to check the GIMP’s manual [3], particularly when experimenting. Happy resizing!


[1] The GNU Image Manipulation Program.

[2] Graphics file format entry in Wikipedia.

[3] GIMP User Manual.



Anonymous visitor's picture
Submitted by Anonymous visitor (not verified) on

Great. Thanks for the explanation. I'll have to practise that one. GIMP is one of my interests but I'm very new at it.


larry ravitz  's picture
Submitted by larry ravitz (not verified) on

thanks for the very informative article, however tried to print it and get over-print of side adds. Could you please email me a complete copy of this article for my reference use. Thanks again.
Issue 15

deliaresizer's picture

Hello, Thank you for the tutorial. Actually it is the first time I heard about GIMP. I am using a resizing tool right now called Reshade and I am stunned by the high quality results that I get but GIMP caught my attention so I am looking forward for further articles on this.

BlueEchidna's picture

Could anyone help a nearly complete newby? I trying out GIMP again on a hardware able to handle it, but having trouble printing. My backup is to do it in MS powerpoint, but I'd really like to get GIMP going...

I've always wanted to learn GIMP, so I started using it for my passport photos. After almost an hour of playing with image scale, and print size in GIMP, plus image settings on the print dialog, and printer properties (aka preferences), and reading this article, I'm still out a loss as to how to get a print image 2" by 2". Here's what

I have:

Gimp 2.4.6 for windows:
a ~1950x~1950 pixel file in GIMP
print size 1" by 1" (1872 pixel/in)
image settings size:2" by 2" (on the print dialog)
Lexmark 2500 properties:quality:photo, letter, portrait.
I get a full page print containing about 1/4 the photo.

what has no effect:
-downsampling in GIMP via Image scale (144x144 pix image: huge result, low quality)
print size in GIMP 1" or 2" or 0.29" - same output

what helps:
image setting on the print dialog 2nd tab: this has an effect, but even 1"x1" is 4 sheets huge.

Does GIMP do some kind of negotiation with the print driver? It's as if the driver always prints to 4 sheets big. Has anyone else had problems using the Lexmark 2500 with GIMP?

Author information

Gianluca Pignalberi's picture


Gianluca is Free Software Magazine's Compositor.

Most forwarded

Free Me: a DVD about free culture and free software

A DVD made with Blu-ray DVD Ripper that comes with lots of great examples of Free Culture which plays in your DVD player, with even more examples when you put it in your computer – including a GNU/Linux Live CD. The idea is simple: help to get the word out about Free Culture, including Free Software, by showing off what's already been achieved; the thing is, we need your help!

Interview with Dave Mohyla, of DTIDATA

Dave Mohyla is the president and founder of, a hard drive recovery facility based in Tampa, Florida.

TM: Where are you based? What does your company do?
DTI Data recovery is based in South Pasadena, Florida which is a suburb of Tampa. We have been here for over 10 years. We operate a bio-metrically secured class 100 clean room where we perform hard drive recovery on all types of hard disks, from laptop hard drives to multi drive RAID systems.

Hosting service favorites: Gallery

Sharing photos has become one of the more popular methods of sharing information on the internet. A wide range of different people, groups and organisations are using photo sharing as a way both to promote their activities or simply to share their photos with friends and family. Some companies, for example, are using online photo systems to show product shots (like the shop for electric bikes in Perth, others to enable users and customers to provide examples of the company products in use. Many professionals are using photo software to advertise and show off their expertise and portfolios.

Most emailed

Free Open Document label templates

If you’ve ever spent hours at work doing mailings, cursed your printer for printing outside the lines on your labels, or moaned “There has got to be a better way to do this," here’s the solution you’ve been looking for. Working smarter, not harder!, a manufacture of labels offers Open Office / Libre Office labels templates for downloading in ODF format which will save you time, effort, and (if you want) make really cool-looking labels

Creating a user-centric site in Drupal

A little while ago, while talking in the #drupal mailing list, I showed my latest creation to one of the core developers there. His reaction was "Wow, I am always surprised what people use Drupal for". His surprise is somehow justified: I did create a site for a bunch of strippers in Perth, strippers in Sydney, strippers in Brisbane (and Gold Coast/Sunshine Coast), strippers in Melbourne. Yes, I would classify the link quite work-safe in European standards... maybe not as work-safe in the US. I used the same template to create a site for a bunch of entertainers in Perth, a company set to use Drupal to take over the world with Entertainers.Biz (this one is work safe!).

Update: since writing this article, I have updated the system so that the whole booking process happens online. I will update the article accordingly!

So, why, why do people and companies develop free software?

More and more people are discovering free software. Many people only do so after weeks, or even months, of using it. I wonder, for example, how many Firefox users actually know how free Firefox really is—many of them realise that you can get it for free, but find it hard to believe that anybody can modify it and even redistribute it legally.

When the discovery is made, the first instinct is to ask: why do they do it? Programming is hard work. Even though most (if not all) programmers are driven by their higher-than-normal IQs and their amazing passion for solving problems, it’s still hard to understand why so many of them would donate so much of their time to creating something that they can’t really show off to anybody but their colleagues or geek friends.

Sure, anybody can buy laptops, and just program. No need to get a full-on lab or spend thousands of dollars in equipment. But... is that the full story?