# GIMPLite Quickies

This tutorial is based on text and images Copyright © 2004 Carol Spears. The original tutorial can be found in the Internet bibliography-online-tutorial02.

## Intention

So, GIMP is installed on your computer, you need to make a quick change to an image for some project, but don't want to learn about computer graphics just to change an image; totally understandable. GIMP is a powerful image manipulator with many options and tools. However, it is quick and somewhat intuitive (after a time) for the small jobs as well. Hopefully, these quickies will help you with your quick problem and help you to stay friends with The GIMP; and ready for the more complex tools and methods later, when you have the time and inspiration.

A couple of words about the images used here. The images came from APOD bibliography-online-apod01, Astronomy Picture of the Day. The screenshots were taken on my desktop which is sporting this APOD bibliography-online-apod02 image.

All you need to know to start this tutorial, is how to find and open your image. (File Open from the Image window).

## Change the Size of an Image (Scale)

Problem: you have a huge image and you want to resize the is so that it will display nicely on a web page. The example image is this beauty m51_hallas_big.jpg from APOD bibliography-online-apod03.

### Example Image for Scaling

The first thing that you might notice, is that GIMP opens the image at a logical size for viewing. If your image is really big like the sample image, GIMP will set the zoom so that it will display nicely on the screen. The zoom level is shown in the status area at the bottom of the Image window.

The other thing to look at in the title-bar is the mode. If the mode shows as RGB in the title bar, you are fine. If the mode says Indexed or grayscale, read the gimp-tutorial-quickie-change-mode.

### GIMP Used for Image Scaling

Use Image Scale Image to open the Scale Image dialog. You can right click on the image to open the menu, or use the menu along the top of the Image window. Notice that the Scale Image menu item contains three dots, which is a hint that a dialog will be opened.

### Dialog for Image Scaling in Pixels

If you have a desired width, put it in the dialog at the top where it says Width. If you don't have such a number in mind, you can steal the width of GIMP's default image size, which is 256 pixels. This is shown in the figure above.

### Dialog for Image Scaling in Inches

Perhaps you want your image to look more like a 4x6 inch photo on most image rendering web browsers. Switch the units to inches and enter 4 inches in the height box (opting for smaller than 4x6 rather than bigger). You can see this dialog above.

Let GIMP choose the other dimension length for you. Meaning, it requires more image knowledge to change both width and height and have it look correct. So change only one item and let GIMP change the rest. To change the other dimension, see gimp-tutorial-quickie-crop.

## Make JPEGs Smaller

### Example Image for JPEG Saving

You can make your jpegs smaller (use less space on disk) without changing the image dimensions. The image for this example is also take from APOD bibliography-online-apod04. The original image is huge (3000 pixels wide) so first I reduced the width and height for better use on the web (see gimp-tutorial-quickie-scale). Use File Save As to open the Save Image dialog.

### Save Image Dialog

I usually type the full filename with extension into Name text box, and GIMP determines the file type from the file extension; for example, .jpg. Use the file extension list, circled in the figure above, to see the types supported by GIMP. The supported extensions change depending on your installed libraries. If GIMP complains, or if JPEG is grayed out in the Extensions menu, cancel out of everything and step through the gimp-tutorial-quickie-change-mode.

The Save as JPEG dialog uses default values that reduce size while retaining good visual quality; this is the safest and quickest thing to do.

### Save as JEPG dialog with poor quality.

Reduce the image Quality to to make the image even smaller. Reduced quality degrades the image, so be certain to check Show preview in image window. As shown in the figure above, a Quality of 6 produces a very poor quality image that uses very little disk space. The figure below shows a more reasonable image. A quality of 42 produces a reasonable image using much less disk space, which will, in turn, load much faster on a web page. Although the image is degraded, it is acceptable for the intended purpose.

### Dialog for Image Saving as JPEG

I have not been showing the actual jpegs I created so that we could end this quickie with a race.

### Example for High JPEG Compression

Quality: 6; Size: 1361 Bytes

Quality: 42; Size: 3549 Bytes

### Example for Moderate JPEG Compression

Quality: 85 (GIMPs default); Size: 6837 Bytes

Quality: 100; Size: 20,971 Bytes

## Crop An Image

### Example Image for Cropping

Source image

Image after cropping

There are many reasons to crop an image; for example, fitting an image to fill a frame, removing a portion of the background to emphasize the subject, etc. There are two methods to activate the crop tool. Click the button in the Toolbox, or use Tools Transform Tools Crop in the image window. This will change the cursor and allow you to click and drag a rectangular shape. The button in the toolbox is the nicest way to get to any of the tools. I have chosen one of the huge and beautiful APOD images bibliography-online-apod05.

### Select a Region to Crop

I always click on the approximate upper left corner and drag to the lower right corner; the approximate path is shown in red. You don't need to worry about being accurate on this first swipe with the crop tool.

### Dialog for Cropping

After completing the click and drag motion, a rectangle with special regions show the selected area. As the cursor is moved over the different areas of the selected crop area, the cursor changes. You can then drag the cursor to change the dimensions of the selected area. As shown in the figure above, as the crop area is resized, the dimensions and ratio are shown in the status bar. See gimp-tool-crop for more information on cropping in GIMP. If you would like to make this rectangular image square, you should find the width and height from the Get Image Information Quickie (see gimp-tutorial-quickie-info. Use the smallest of the two lengths to determine the size of the square. In my 300 x 225 pixel image, the largest square I can get is 225 x 225 pixels. Use the image and the squares to get the best part of the image for the area. Use any of the areas to move the edges and change the dimensions to achieve the image that you prefer. Double click in the area to crop the image.

## Find Info About Your Image

### Finding Info

This example uses another image image from APOD bibliography-online-apod06. Much information is available directly from the Image Window; for example, the image dimensions.Use Image Image Properties to open the Image Properties dialog, which contains even more information.

### Image Properties Dialog

If you are just making a square out of a rectangle, like in the gimp-tutorial-quickie-crop, it is fast and easy to find the smallest dimension. you need only to open the dialog and find the lesser length and use that as described. Since this is very little information, and definitely not enough to fill the space between the menu thumbnail and the dialog screenshot in my layout, I thought I would run through some calculator exercises that might help you to meet your image needs.

### Scale Problem

It is nice to have images appear on a browser window as a photo would. Photos online appear to be 4x6 inches when scaled to 288x432 pixels (72 dpi for many monitors). There is a problem, however, if you try to scale this image. The ratio of width to length of the original does not match the ratio of the photo. So, to make the scaled image the correct size some pixels must be cropped from the height. The final image will appear as a 6x4 inch photo on many monitors.

### Problem Solved by Cropping

There are problems when mixing scanned photos, digital photos, and scanned negatives. Many film developing machines automatically crop portions of the image so that they will match the printing size, or a certain style. If you are preparing an image to be printed on a machine like this; or if you are planning on a gallery where the images are from different sources, some intelligent cropping to fit the best size for the medium you have chosen will be a plus. If this is confusing; please blame the photo printing industry and not GIMP.

You can change the Resolution of your image as well, using the same methods we used to Scale the image, although, in my somewhat limited use, the issue is more about how many pixels. Let's say you want to print an image at a photo lab. 300 pixels for every inch is preferred. An image that is 2241x1548 pixels will easily print as a 7 x 5 photo. 2241px/300ppi = 7.47 in. Get your calculator for the short side. 1548/300 = _.

There is another brutal fact you should come to terms with if you are new to graphics and computers. Just because it looks good on the screen doesn't mean that it will print nicely. I tried to emulate how this image would appear printed at 300dpi. Sorry. There are some options, for instance my friend printed images and then scanned them back in. Terrible business!

### Actual printing result of example image

## Change the Mode

As with anything else, images come in different kinds and serve different purposes. Sometimes, a small size is important (for web sites) and at other times, retaining a high color depth in all its glory (a family portrait) is what you want. GIMP can handle all of this, and more, primarily by converting between three fundamental modes, as seen in this menu. In order to switch your image to one of these modes, you open it and follow that menu and click the mode you want.

### Dialog for changing the mode

RGB - This is the default mode, used for high quality rich color images. This is also the mode for most of your image work including scaling, cropping, and even flipping, as it gives the computer more information to work with. The extra information also makes RGB Mode the largest to store as a result.

A little bit of detail if you are interested. Each pixel or point when in this mode consists of three different components. R->Red, G->Green, B->Blue. Each of these in turn can have an intensity value of 0-255. So, at every pixel, what you see is an additive combination of these three components. All these combinations result in a way to represent millions of colors.

Indexed - This is the mode usually used when file size is of concern, or when you are working with images with few colors. It involves using a fixed number of colors, 256 or less, at each point to represent the color at that point. The defaults to attempting to figure out an "optimum palette" to best represent your image. Try it, you can undo it if you don't like the results, or use a custom palette or more colors.

### Dialog Change to Indexed Colors

As you might expect, since the information needed to represent the color at each pixel is less, the file size is smaller. However, sometimes, there are options in the various menus that are "greyed" out for no apparent reason. This usually means that the filter or option cannot be applied when your image is in its current mode. Changing the mode to RGB, as outlined above, should solve this issue. If RGB mode doesn't work either, perhaps the option you're trying requires your layer to have the ability to be transparent. This can be done just as easily via Layer Transparency Add Alpha Channel .

### Add Alpha Channel

Grayscale - In case you want to convert your brilliant color image to something that's black and white (with a lot of shades of grey), this is one of the easiest ways in which to do it. Some photos do look a lot fancier when displayed in grayscale. Again, if you're interested in some detail, this is achieved by taking the RGB values at the pixels in your image, and suitably weighted averaging them to get an intensity at that point.

There is no need to convert an image to a specific mode before saving it in your favourite format, as GIMP is smart enough to properly export the image.

## Flip An Image

When you need the person in the photo looking in the other direction, or you need the top of the image to be the bottom. Mirroring the image (sort of). Use Tools Transform Tools Flip , or use the button on the toolbox.

### Dialog Flip an Image

Using another APOD image bibliography-online-apod07 I demonstrated all of the flips on this image.

The tool used as is (the default) will simply flip the image at its vertical axis. If you double click on the button,the tool options dialog will open, if it is not already displayed in the dock under the toolbox. Use the options dialog to switch between horizontal and vertical. You can also use the Ctrl key to switch between horizontal and vertical. All possible flips are displayed in this page.

### Example Image to Flip

Source image

Horizontal flipped image

Vertical flipped image

Horizontal and vertical flipped image

## Rotate An Image

### Menu for Rotate An Image

Let's say you turned your brand new digital camera to get a vertical shot, now some of your images are on their sides. Use Image Transform Rotate 90° clockwise . Using an APOD image. I rotated it once to demonstrate 90 degrees CCW.

### Example for Rotate An Image

Source Image

Rotated image 90 degree CCW