Friday, February 29, 2008

File types and the GiMP

With the scrappy little bit of knowledge you now have about the GiMP, my guess is that you're poking around and making some images, or editing images that you have been wanting to fiddle with, and you want to be able to SAVE YOUR WORK.

You know: because if you SAVE YOUR WORK, you don't have to START ALL OVER AGAIN if your power fails or you fall asleep while playing with your new, free toy here.

But when you try to SAVE YOU WORK, the GiMP saves it as something called a .xcf file -- and your web browser can't open that now, can it?

So, first rule about saving with the GiMP is this: when you go to save, select the file type by selecting the correct file-type extensions -- that is, the right 3-letter suffix that comes after the ubiquitous "dot" in all normal web file names. If you omit it, the GiMP will substitute ".xcf", which ultimately means "GiMP-native file format".

The good news with .xcf is that it preserves all your resolution and layers for future use, and the bad news is that it only opens with the GiMP. What you need to do is save your work in a web-ready format, and we're going to talk about the 2 major file types which are used all over the web today -- because each has its own upside and downside.

{BTW, all the images in this tutorial are downloaded from stock.xchng which is a royalty-free source of photos and images, so thanks to them for their support of better web images for everyone}

The two most-common file formats on the web today are ".jpg" (or "j-peg") and ".gif" (or "GIF"). JPG format is a variable-definition format in which the user determines the ultimate quality of the image by selecting a % of compression upon saving. Higher compression means smaller file-type, but it also means poorer quality. Consider this image:

As an original, this image was saved as a JPG at 100% quality, meaning little or no compression. Now consider this one:

Same base image, but it was saved at 33% quality, so the file size is much smaller, but the quality also comes way down. Notice in that image how there is "noise" around the high-contrast areas of the image, like at the edge of the letters. This is due to the type of compression used in a JPG. However, if you can live with a little noise, the second image is only 16K while the first is over 130K. There is probably a compression setting between the two extremes which you can use to reduce the noise but keep your file size down to a something which doesn't drive the few phone-moden users left on the net completely insane.

Since the JPG format is about as old as computing, it has evolved over time, and its younger cousin is the .png format. There are some real benefits to PNG, but for today let's just say that PNG is for times when higher quality is prefered but file size is not much of a consideration.

The other "web-ready" file format we're going to chat about today is the GIF format, which you can see below:

GIF files use something called "indexed color" to help reduce file size. A color index is essentially a chart or map of the strict colors used in an image, and the receiving platform simply uses that color map (usually embedded in the file) to render each pixel. This first image actually uses only 64 colors to render the picture, and it actually looks pretty good by itself. However, if you compare it to the "JPG HIGH DETAIL" image, you can see specific graininess in the clouds and in the lit sky where there are gradients of color moving from light to dark. That graininess is called "dither", and to some degree you can control it by selecting the method of dither when you convert your image to indexed color.

You can see the further effects of dither in this next image, which is saved down to a 32-color index:

I know what you're thinking: maybe what I want is no dither to eliminate the graininess. that seems like a good idea in theory, but when you actually render a no-dither, you get something like this:

You get something which looks far less realistic, though perhaps there are some applications for this kind of rendering when you want a more impressionistic effect.

For now, just remember that to save as any file type, you simply have to change the file type extension of your file in the "Save As ..." dialog box, and the GiMP will drive the file conversion.

Next time we'll talk more about how to manage your color in images more effectively than simply letting the GIMP create bad choices for you.

Thursday, February 28, 2008

Other GIMP Tutorial sites

In an effort not to be a one-man band, and in an effort to help you get better at GiMP at a pace faster than my limited ability to make new entries here, here's a short list of other sites dedicated to giving you GiMPstructions:

GiMP Tutorials

GUG (GiMP user group) Tutorials {I particularly recommend this one on making realistic glass gems as an intor to how much power is in this tool set}

RRU Tutorial is an ancient tutorial, and it has a lot of geek-speak in it, and it's from a very old version of GiMP, but for the more technically-minded it has useful info.

GiMP savvy, which is another OLD tutorial, but good for basic understanding.

NEW! Meet the GiMP video tutorials.

Tuesday, February 26, 2008

Handling the basic tools

OK – I sorta left you hanging in the last entry with your puny 200x200 workspace, but I figured you had enough information there to at least get yourself into only a little bit of trouble. I also wanted to switch platforms so that I wasn't only vexing the WIN users, but I'll be honest enough to admit that I will persistently vex the UNIX/LINUX and other users as I don’t have a place to work the GiMP from those environments. The stuff you see today will be harvested from an older Windows box running XP Professional using the "silver" appearance scheme.

And this box has an extra-big screen, but as you can see, I have the GiMP configured as we left you last time, which is with the simply tool bar and the "Tool Options" dialog. This lesson, we're going to try out the 7 most basic tools on the pallet, all of which you will recognize from your rudimentary paint program. However, I hope that you will find these 6 tools slightly more robust than what you find in grubby ol' MS Paint.

"But Cent," you are saying, "You have only labeled 6 tools. You said 7 tools."

Patience, young GiMPster. Patience.

The first tool we'll take a look at is the one at the bottom of the pallet, which is the foreground/background (FG/BG) tool. It seems a little much to call this an actual "tool", but it is actually the most basic and useful tool on the pallet as it actually effects all the other tools in a significant way.

First, in case you have been working ahead, click the little black-over-white widget at the bottom of the FG/BG tool. This reverts the tool to its default status, which is black foreground and white background.

See? Very tricky, I am sure. Now select your Rectangle Select tool, and use it to select a roughly-square section in the middle of your 200x200 sandbox image, thus:

Now, if you "cut" that square in the current state of the tool set, it will look like nothing happened – because you have the background set to "white", and the image itself is set to white, right? But if you click the swap arrows and put black in the background and "cut" the selection (you could use CTRL-X, or drop down the Edit menu – I imagine you know those really ubiquitous commands), you get a black square in the middle of your image, thus:

Now, look at that: you have just grasped the basics of two simple tools! I know – you could have prolly gotten that on your own, but I wanted to show you that you're not really that lost with this robust tool: you really do have enough essential knowledge to not be intimidated by what the GiMP can do.

Now reset the FG/BG tool, select the Elipse Select Tool, and make your sandbox image look like this:

Right? That's not a problem, and anyone can do that – even with MS Paint.

Yes, you're very smart. But now we're going to unleash the elusive tool #7 to show you why you should use something this robust rather than the box of 8 crayons known as "MS Paint".

Look at the menu selections in your sandbox image, and notice the "Dialogs" menu – the one which you used to turn on the Tool Options dialog.

Notice the option "Layers". (All the Photoshop people now went "ahhhhhhh", as if they just got a glass of cold lemonade on a hot day) Select that, and take a look at what it says about your sandbox image.

I'm not going to overwhelm you with the power of this tool today, but I am going to show you how to use it in a rudimentary way. Notice in the bottom-left corner it has a button that looks like a grayed-out document. If you hold your mouse over that button, it says "Create a new layer and add it to image". Go ahead and click it, and you'll get this dialog:

Go ahead and rename the New Layer "circle", and make sure the "Transparency" radio button is selected. Then click "OK". Your Layers dialog box will now look like this:

Now, so what? Seriously: the image didn’t change one bit by looking at it, right? Well, that's actually the point, dude. What you have done is added a virtual piece of transparent plastic over the picture you are working on, and it will allow you to do all kinds of weird stuff to your image without destroying it.

For example, go ahead and paste your clipboard into the image now. Your sandbox will look like this:

and your layers dialog will look like this:

Which, again, not very exciting even after you hit the little button with the anchor on it to put the clipboard solidly in the circle layer:

In fact, it looks like you did a lousy job of trying to put the circle you cut back into the hole you made, right? I mean, unless you're an android or something and you cut the circle from the exact center of the sandbox image, it's not pasted in the center.

Well, let's use the Move tool to actually move it to where it belongs. Select the move tool, then in the layers dialog select the "circle" layer. Now move to the sandbox image and drag the circle so it lines up perfectly, like this:

Now, the more observant amongst you are wondering what the dotted lines are in that image. Those likes are the actual edges of this layer for your reference, which won’t matter to you for a little while, but just remember that you can see the edges of your layers when you select the layer.

But again, you may be thinking, "yes, but so what? Why put things in layers when in fact I can just select them and paste them in Paint and get more or less the same effect?"

You see: there you are trapped in the limits of your own experience. Take a look at the Layers dialog for a second, and make sure the "circle" layer is selected. Now check the "opacity" slider. "Opacity" is a characteristic of a layer which is sort of the opposite of "transparency". 100% "opacity" equals 0% "transparency", thus our pasted layer is like a black tar dot over the rest of the image.

Now check this out:

I have adjusted the layer opacity to 50% (you can slide the slider, or you can highlight the value and type in a new one), and what I get is this:

Again, not very impressive in and of itself, but you do the same thing, then use the Move tool to move it around your sandbox to see how the image behind the layer shows through.

OK – fast count says that there is more than 4 pages of instruction here, and we have only covered 4 of the 7 tools. Select the Bucket Fill tool, and let's bust a move. Now, to see how really impressive GiMP is, go to the FG/BG tool, and double-click on the black FG color. You'll get this:

Now, your color picker tool will not be filled up along the bottom with all the colors my version of the GiMP is because you haven't picked or built a lot of custom colors, but look: highlight the text in the "HTML notation" field, and type "ff0000" where the "0" are ZEROS not "o"s. That should change you "Current" color to a very bright red, at which time you should click "OK".

Notice that your FG color is now red. In the "Layers" dialog, select the "circle" layer, and move your Bucket fill tool over the circle in your sandbox image. Click someplace on the gray area, and you get this:

Your circle stays in tact, it's opacity stays in tact, but its base color changes from black to red. Now, this doesn't really look that astonishing in our simple example, but keep in mind that we're just test-driving the tools for future use.

Last tool: pencil tool. Like you don't know how to use the pencil tool, right? Heh. You kids. Select the pencil tool, then look at the "Tool Options" dialog. You should have something like this:

Notice the "Brush" button, which, if you click, will pop open a menu like this:

That submenu lists all the brush styles available for the pencil tool, so you are not stuck with just a square block point to try to draw what you want to draw.

And believe it or not, that's not the best way to draw complex objects in GiMP, but we have just rolled over page 5 in WORD, so you must be full. I can promise you I am on empty right now.

Use what you know, and I'll be back later to give you some more.

Sunday, February 24, 2008

Where are the comments?

To keep my sanity, I'm not allowing comments on this blog in the tutorial entries, but every now-and-again I'll open a post which gives you readers a chance to ask questions and get them answered. Comments will be moderated, so you won't see your question pop right up in the meta.

This will be the first comments-open post just to test out the template and make sure all works well.

starting up the GiMP

OK -- I imagine that many of you have installed the GiMP and have tried ti play with it. That's good -- but now you're frustrated because you have no idea what you're doing. The tool is somewhat robust and you're a N00b.

You know: we have all been there.

So wherever you are, let's just launch the GiMP and walk through the basic menus together, and work on a small project just to get the hang of what exactly we can do with this thing.

To make life harder on you, I am writing this first tutorial on my wife's Mac laptop which has a small screen, so as we look at the screen captures what you see may vary by platform (the way the windows render, or how your desktop works), but they will still manage to have the same functions.

Let's look first at the startup state of GiMP, which you can see on my Mac here.

It doesn't look very impressive, does it? I mean: even Paint opens up with a pallet and a workspace, right? GiMP just opens up with this tool pallet dialog and nothing else.

Listen: that's more than enough to start your project. Let's look specifically at the tool pallet and see what it can do for us.

Now, depending on how you have sized your dialog box, it ought to look more or less like the example, above. You can play with the best sizing of the tool pallet dialog by clicking and dragging the bottom-right corner. I have sized my tool pallet dialog so that we can easily see the menu options -- because that's what we need to get started on a new image.

Use your mouse, click on "File" menu, and let's see what happens.

What you get is a classic "File Menu" set of choices, including (as you can see) the opportunity to configure the GiMP's preferences and edit the Keyboard shortcuts. However, that's an intermediate-level piece of customization, and if you customize GiMP, you might find it harder to follow the tutorials posted here.

We'll cover each part of the file menu separately. Today we're simply going to create a new image, so select "New...". As you do that, notice something which will be specifically annoying for Mac users: all keyboard shortcuts are in WIN/PC conventions, so they are actually "CTRL" + "KEY" and not "APPLE" + "KEY". Get used to it.

OK: when you select "New...", you get this dialog box:

To try to keep this beginner tutorial brief, we're not going to talk about new image templates in this post, and we're also not going to fiddle with the "Advanced Options" right now. Instead, we're simply going to open a new image 200 x 200 pixels in size.

Use you mouse and highlight the value in the "Width" box, or type "Alt-w" to highlight it, and type in "200". Then, highlight the value in the "Height" box, or type "Alt-e" to highlight it, and type "200", and click "OK".

You should get something that looks like this:

Now, with that, you're ready to start monkeying around with the tool set on your own, but I want to give you a pointer that will help you understand how the tools work a little better. In the New Image window, select the "Dialog menu"

In the "Dialog Menu", select "Tool Options". You will get a new window on your desktop which will vary depending on which tool you select, but this window is important as it shows you all the options you have for controlling the tools you select as you walk through the GiMP.

You go ahead and play with your 200x200 image for a little while, and next time we'll walk through the basic tools for image manipulation.

Saturday, February 23, 2008

So what is "the GiMP"?

So what is "the GiMP"? Is it a character from a Tarantino movie? Is it some kind of weird role-playing character? Is it some kind of careless slander?

Yeah, no.

GiMP 2.4 is the "GNU Image Manipulation Program", suitable for a variety of image manipulation tasks, including photo retouching, image composition, and image construction.

One of the GiMP's strengths is its free availability from many sources for many operating systems. Most GNU/Linux distributions include The GIMP as a standard application. The GIMP is also available for other operating systems such as Microsoft Windows™ or Apple's Mac OS X™ (Darwin). The GIMP is a Free Software application covered by the General Public License (GPL license). The GPL provides users with the freedom to access and alter the source code that makes up computer programs. (thx, GiMP Users Manual)

And here's the thing: most people, frankly, don't have the $100 to buy Photoshop Elements, and definitely don't have the mad cash for Adobe Creative Suite, but they also don't want to be embarrassed with ridiculously-childish graphics on their web site. So for all of you, on all your various platforms, the GiMP is a great solution so that you can at least use something other than, well, MS Paint and crossed fingers.

So your first assignment here is to download the GiMP (for the purpose of this site, you should try to get GiMP 2.4 as that will be the version we are using until further notice, without regard to current versions) and install it on your system. MAC users will have a fairly-easy time; WIN users will have a slightly-more complicated time, but honestly I find that GiMP works best in a WIN environment with at least 1 GB of ram. Because this isn't really a geek blog, we're not going to ask the question or explore the reasons for the performance gap.

What we're going to do is edit graphics. You get to work, and I'll work up some intro tutorials. If you can't wait for mine, you can go to and work through the ones they have posted.


Yes, hello. Nice of you to drop by.

If you're stopping by here, you have probably downloaded a copy of a piece of software known as the GiMP, and you have installed it, and now you have no idea what you're doing at all -- it's practically sancrit, and not the normal baghavad gihta kind, either, but the kind that Indiana Jones finds on a map which tells him where the lost treasure of Darius is buried, and he needs John Rhys Davies to translate it for him.

Something like that.

This blog is dedicated to help the completely helpless use the GiMP to do something with their graphics besides hacking them to pieces with MS Paint or some other such 10-pound sledge of a tool.