Tuesday, March 10, 2015

Creating a Letterbox Matte With GIMP



The GNU Image Manipulation Program, or "GIMP", is a great tool for image editing.  It is freely-available, which is great news for those with a casual need to edit images that don't want to invest in an expensive software suite.

However, it can be a little trickier to use...

For example, creating a letterbox matte around an image.  Once you figure it out, it's very simple, but before you figure it out, there may be much searching, clicking, and gnashing of teeth.

So here is how you create a letterbox matte around an image in GIMP.

In this case, I am going to letterbox an image for a wide screen format.

REMINDER: you can click on these images to see the original size.

Do the Math


  • My image is 800 x 625
  • I want a 16:9 ratio, so I need to divide my height by 9 and multiply that result by 16
  • (625/9)*16=1111 pixels wide
  • I will round that to 1112 for convenience
  • That means 312 more pixels horizontally, or 156 pixels on each side

Create the Matte Layer


First, we create a new layer for the matte, by going to Layer > New Layer.


We use the default choice for the layer, which should be the same size as the image and "White".  then click "OK".


Now we should have a new white layer on top.



Optional - Change the Matte Color


For this example, let's make the letterbox black.  Tools > Paint Tools > Bucket Fill.  


Make sure the color is black and click inside the layer.  Now we have a black top layer


Scale the Matte Layer


Now it is time to increase the size of the matter layer, using  Layer > Scale Layer.



Since I am letterboxing this image I want to only add a matte in one dimension.  In this case, on the sides.  So I need to insure that the chain is broken, indicating that the dimensions are not linked together.  This will allow me to change only one dimension.  Then I want to change the layer "Width" to 1112, my target final width.



When you click "Scale" you should end up with the following:


The scale is automatically centered for you.  The reason you are seeing dotted lines is because your layer is bigger than the "canvas".  So, let's fix that.

Increase the Canvas Size


To increase the canvas size, we us Image > Canvas Size.



I insure the link between height and width is broken, then set Width to 1112 px and Offset X to 156 px.



When I click "Resize" I end up with the following:



Send the Matte to the Bottom of the Stack


We are done creating the matte layer, now it's time to send it to the bottom of the layer stack, using Layer > Stack -> Layer to Bottom.


Flatten the Image


I like to flatten the image at the end.  This merges the layers into one and eliminates any transparencies.



Export the Image


Now we export it to a jpg by using File > Export As.



Then, just choose a file type, adjust the name as desired, and export the file.

Et voilà!

No comments:

Post a Comment