What Happens If You Turn on the Lock Alpha Channel Button on GIMP?

By Kylene Arnold

The GNU Image Manipulation Program, or GIMP, separates its display information into four channels. The red, blue and green channels describe how much of these colors each pixel displays. The fourth channel, the alpha channel, describes how opaque or transparent each pixel is. When the "Lock Alpha Channel" check box is selected in GIMP, it prevents the user from making any changes to the transparent portions of the image.

Alpha Channels

A pixel's alpha channel controls the opacity of all the color channels on that pixel. For instance, if the alpha channel is set to 50 percent opacity, the red, green and blue channels will all become half transparent. Most file formats that support alpha information have 256 discrete levels of opacity, with zero being completely transparent and 255 being completely opaque. However, GIF files only support completely transparent or completely opaque pixels.

Unlocked Alpha Channel

When GIMP's alpha channel is unlocked, the user can manipulate it in any way he desires. Transparent portions of the image can be filled with color or drawn or painted upon. Gradients can be added, images can be cloned into empty spaces, etc. All of these actions convert transparent pixels into opaque or translucent ones. This is the default setting for all GIMP projects.

Locked Alpha Channel

If the user wishes to protect the transparent pixels so that no changes can be made, he may lock the alpha channel by checking the "Lock Alpha Channel" check box in the "Layers" dialog box. This check box only applies to the active layer. If he wishes to affect all the layers, he must select each one and lock its alpha channel individually. Once the alpha channel is locked, he can affect only opaque or translucent areas of the image.

Applications

Locking the alpha channel is GIMP's way of helping you not "color outside the lines." It is a convenient feature when working close to the boundary of an opaque object. For instance, if you wish to use the Smudge Tool to smear two colors together, but you don't want to smear them off the object, which is surrounded by transparent pixels, lock the alpha channel to limit the effect to the object's surface. Note that alpha channels are supported only by TIFF, TGA, PNG, PSD and GIF files or by GIMP's XCF project file. Therefore, if you lock the alpha channel but try to save your image as a different file format, the transparent areas will be exported white.