Friday, January 18, 2008

How to Adjust any Picture to be an Avatar for Forums using the GIMP

Why the Gimp?
I've used the Gimp because it's freely available and works on a number of different systems. It's not my favourite graphics program but it will do the job.

Where can I get the GIMP?
Download it from; http://www.gimp.org/

I'm not going to cover installation since it's mostly a matter of clicking Next a few times then finish.

Avatar Size Restrictions
Most forums place restrictions on the dimensions of Avatars. You should check your particular board for their rules otherwise you could make an image too small to be clear or too large to be used.

For the purposes of this exercise, I'm going to make the following assumptions;
  • Maximum width = 130 pixels
  • Maximum width = 160 pixels
  • Maximum file size = no more than 15.77 Kb.
  • File Formats = JPG or GIF

Procedure
1. Start the GIMP

2. On the GIMP window that has a menu, select File, then Open and choose your image. The image should display in a different window (with it's own menu).

3. Now, Back on the main GIMP menu, click the icon marked Select Rectangular Regions



4. Use the mouse to draw a rectangle around the part of the image that you want to use for your avatar.

5. On the Menu above your image, choose Image, then Crop Image, you should now be left with just the square you want for your avatar. Unfortunately, it will probably be way too big.




6. On the Menu above your image, choose Image, then Scale Image - a dialog box will appear.



7. Type in the Width of 130 and press Tab. The height should adjust automatically. In our case, it went to 111 which is smaller than the restriction.



Now... here comes a choice.
We could have a wide but short image or we could try to use the full image height at the cost of some of the width. If you choose - Wide but short, you can just click the button marked Scale and skip to step 8, otherwise you can do the following;

7a. Type a Height of 160 into the Height box and press Tab - this makes the Width fill in - now the width adjusts to 187 (which will be too big but we'll trim that later). For now, just click the button marked Scale.

7b. The image should now be smaller - the next step is to reduce the width... so, Click Image, then Canvas Size



7c. In the Dialog box, click the Chain link so that the Height and Width are no longer being adjusted at the same time. Now type the Width in as 130 and press Tab

7d. A white square will appear on the Image. Use the mouse to move the image until the part you want is entirely inside the square, then Click Resize.



8. Click File, Save As, then Give your file a name. You may get some warnings, just click Export on them.
You'll also get a JPEG Quality screen - a value of 66 should be more than adequate for an avatar - change it to that and then Click Ok.

9. Your avatar should now be saved - use Windows Explorer (or some other file manager) to have a look at the file and make sure that it fits the relevant restrictions. The height and width should be right but the file size may be too large.

10. If the file size is ok, then you're finished

11. If the file size is too large, you can try the following;

12. Back in the GIMP, select, Image, Mode, Indexed... and a dialog box will appear.



13. Select Generate Optimum Palette and set the Maximum number of colors to 256 to start with. If your image still ends up with too large, you can start reducing the number of colours, particularly if you're using a cartoon or line drawing instead of a photo for an avatar. For photos, try 64 colors and for cartoons try 16.



14. Click Ok
Have a look at your image, does it appear to be ok? It probably won't look perfect but hopefully it shouldn't be too badly affected by this step. If your image is not ok, you need to use more colours (don't go above 256 though) - so choose edit, undo and try that last step again.15. If your image is ok, then you're ready for saving. This time, Choose File Save as, but expand Select File Type and choose GIF Image.

16. Click Save to save your file.

17. Check your file size using Windows Explorer (or Equivalent) - often GIFs are smaller than JPEG, but not always.

No comments: