GIMP Guru

MatsAndFrames

Creating Virtual Mats and Frames with The GIMP

Warning: maximize your browser window now! Wide images ahead…

Original Matted and Framed

Although real mats and frames are much preferred, there is the occasional time when you want to add some ornamental embellishment around a photo that will be displayed on a monitor. This tutorial shows you how extreme you can get if you are serious about it!

This tutorial was inspired by a thread I read in the Retouching forum on dpreview.com, called “Detailed steps for mattes & frames in PS6″. I thought: “That’s pretty amazing. Useless, but amazing. I wonder how you would do that in the GIMP?” One week later here we are… :-)

The Procedure

First of all you need to download my mats and frames script: mats-and-frames.scm. Put it in your GIMP scripts folder. For *nix users this is ~/.gimp-2.2/scripts. If you have some other operating system, try looking for a folder named scripts in the folder where you installed the GIMP, and put the script there. Fire up the GIMP and you should see the operations available as Script-Fu/Decor/Add Mat and Script-Fu/Decor/Add Frame. This script will do everything that Decor/Add Border and Decor/Add Bevel (respectively) can, and a whole lot more. Furthermore, the latter two are kind of buggy (no Undo, for example) since they don’t seem to have been maintained for a few years.

Load the image to be matted or framed.I recommend that you run this script as the final step, so do any other edits you want first.

If downsampling for the web, scale (Image/Scale) the image down to the final size and zoom in to 100% view.

Run the Add Mat script (Script-Fu/Decor/Add Mat).Here’s a run-down of the parameters (you may also want to refer to the resulting image, below right. Note that in this example some parameters have been changed from the defaults.):

  • Bevel Width: this is the width of the mat bevel in pixels (closest to the picture). Default: 5 pixels.
  • Bevel Fill: what to fill the bevel with. Choices are:
    1. Color: use the color in Bevel Fill Color
    2. FG color: Use the current foreground color in the GIMP toolbox
    3. BG color: Use the current background color in the GIMP toolbox
    4. Pattern: Use the current pattern in the GIMP toolbox

    I used the default, which gives a nice off-white. If you fill with a color (first three options) the color is modified on each side of the bevel to give the appearance of shading (see Delta Value on Bevel Fill Color). Default: Color.

  • Bevel Fill Color: clicking on this pops up a rather onerous dialog that lets you pick a color. This parameter is only used if option “Color” is selected for Bevel Fill). Default: light gray/off-white.
  • Delta Value on Bevel Fill Color: a value that is used to compute the color changes on the bevel sides to give a 3D lighted/shaded appearance. The default value of 25 is good.
  • Mat Width: the width (in pixels) of the mat border surrounding the bevel (i.e. the mat border not including the bevel). Generally this should be much larger than the Bevel Width, unless you are making a double mat. Default: 35 pixels.
  • Mat Fill: identical to Bevel Fill, but for the mat. For this parameter I recommend choosing “FG color” and then using the Palette dialog (Dialogs/Palette) to pick a color or the color picker (“eyedropper”) tool () to sample a color from the image itself (much better than using Mat Fill Color). Default: Color.
  • Mat Fill Color: like Bevel Fill Color, pops up a dialog that allows you to pick a color for the mat. This parameter is only used if option “Color” is selected for Mat Fill). Default: neutral gray.
  • Texture Mat: check this if you want to add some texture to the mat using the Bump Map filter. Default: off.
  • Texture Pattern: click to select a pattern to use for creating the bump map that will add texture to the mat. This parameter is only used if the Texture Mat option is selected. Default: Wood.
  • Leave Texture Bump Map: check this if you want to keep the layer that is created and filled with the pattern to for texturing the mat. Useful if you want to fine-tune the texture afterwards. Default: off.
  • Bump Interactively: check this if you want the opportunity to interactively work with the bump map step. If you don’t check this the default values will be used. Useful if you want control over the texturing process. Default: off.
  • Left Pad, Top Pad, Right Pad and Bottom Pad: amounts (in pixels) to pad the respective sides of the mat beyond the perimeter of the Mat Width. Useful for making one or more sides of the mat longer than the others. Default: 0 pixels (no padding).
  • Use Layers: check this to have the script leave the new layers added in place rather than merging them down onto the image. Highly recommended, especially if you want to tweak the result afterward. Default: off (for the unwashed masses that aren’t enlightened about layers).
  • Leave Selection: check this to have the script leave a selection in place covering the mat (but not the bevel). Useful if you want to tweak the mat afterwards and you aren’t using the Layers option. Default: off.
In this tutorial I’m making a double mat, so I’m going to run the Add Mat script again. If you only want a single mat, skip this step.Note 1: I used a small Mat Width parameter in the last step (8 pixels) to get this effect. This is (obviously) unlike in traditional matting where you might have thought that a larger value would be necessary. Here the image is built up moving outwards, as in adding pixels around the image. If you think about it that way it won’t be confusing.

Note 2: On the last step I also added a few pixels to the Bottom Pad option, which is why you see the extra space there in the result below right.

Note 3: On this run I checked the “Bump Interactively” option to allow me to increase the depth/effect of the texturing in the outer mat.

Time to add a frame. Run Script-Fu/Decor/Add Frame.Here’s a run-down of the parameters (you may also want to refer to the resulting image, below right):

  • Frame Width: this is the width of the frame in pixels. Default: 35 pixels.
  • Frame Fill: what to fill the frame with. Choices are:
    1. Color: use the color in Frame Fill Color
    2. FG color: Use the current foreground color in the GIMP toolbox
    3. BG color: Use the current background color in the GIMP toolbox
    4. Pattern: Use the current pattern in the GIMP toolbox

    Default: Color.Here I chose “Pattern” and using the Patterns Dialog (Dialogs/Patterns from any image window or the GIMP toolbox), selected a nice wood parque pattern (it appears in the GIMP toolbox, next to the foreground and background colors, not in this dialog).

  • Frame Fill Color: clicking on this pops up a rather onerous dialog that lets you pick a color. This parameter is only used if option “Color” is selected for Frame Fill). Default: neutral gray.
  • Texture Frame: check this if you want to add some texture to the frame using the Bump Map filter. Default: off.
  • Texture Pattern: click to select a pattern to use for creating the bump map that will add texture to the frame. This parameter is only used if the Texture Frame option is selected. Default: Wood.
  • Leave Texture Bump Map: check this if you want to keep the layer that is created and filled with the pattern to for texturing the frame. Useful if you want to fine-tune the texture afterwards. Default: off.
  • Bump Interactively: check this if you want the opportunity to interactively work with the bump map step. If you don’t check this the default values will be used. Useful if you want control over the texturing process. Default: off.
  • Beveling Index: the frame is beveled using a bump map step (separate from the optional texturing bump map); this value determines how “high” (3D) the bevel effect looks. Don’t set higher than half the Frame Width. Default: 10 pixels.
  • Inner Shadow Width: a drop shadow is added along the inner boundary of the frame with the mat. It is sightly larger on the left and top than on the right or bottom, but this parameter roughly controls the overall “width” of the drop shadow. Default: 8 pixels.
  • Inner Shadow Opacity: sets the opacity of the inner drop shadow. If you check the Use Layers option you can adjust the opacity of the shadow afterwards. Default: 50%
  • Use Layers: check this to have the script leave the new layers added in place rather than merging them down onto the image. Highly recommended, especially if you want to tweak the result afterward. Default: off.
  • Leave Selection: check this to have the script leave a selection in place covering the frame. Useful if you want to tweak the frame afterwards and you aren’t using the Layers option. Default: off.
  • Leave Bevel Bump Map: as described under Beveling Index, a bump map is created to bevel the frame and give it a 3D effect. If you want to tweak the frame afterwards (e.g. play with different pattern fills, try different textures, etc.), checking this option will leave the bump map layer around so that you can bevel your changes using the bump map filter again. Default: off.

Tips

  • For coloring mats (Mat Fill) I recommend choosing “FG color” and then using the Palette dialog (Dialogs/Palette) to pick a color or use the color picker (“eyedropper”) tool () to sample a color from the image itself.
  • Checking the “Use Layers” option gives you a lot of leeway afterwards to tweak the results. These scripts do work with Undo (Ctrl+Z), but that is a slow, iterative method of working.
  • A drop shadow on the entire framed image adds a nice touch. When you’re all done as described here, do a Script-Fu/Shadow/Drop-Shadow.

Tweaking the results

If you check the “Use Layers” option when running these scripts it is fairly easy to make changes to the resulting mats and frames.

Example #1Q: How do I change the color of a mat, but not the texture?

A:

  1. In the Layers dialog, choose the mat layer (here I’ll use “Mat#2″).
  2. Run Filters/Colors/Map/Color Exchange.Click in the preview window on the mat to select the “From” color. Click on the “To Color” button to activate the Color Selection dialog. You can pick a color with this, or better yet (if you previously selected a replacement color with the Color Picker or Palette and know its RGB values), dial it in directly.

    Now check “Lock Thresholds” and move one of the threshold sliders to the right until the preview window shows all of the pixels in the mat changing to the new color. Click OK.

Voila!Note: if there is no texture in the mat, just check the “Keep Trans.” (keep transparency) option in the Layers dialog for the mat layer and use the Bucket Fill tool to give it a new color–much simpler.

Example #2Q: How do I change the texture of a mat, but not the color?

A:

  1. When creating the mat, check the “Leave Texture Bump Map” option (if you forgot, just open the Layers dialog and create a new layer named “Texture Bump Map” and fill it with white).
  2. Now select the mat layer (here I’ll use “Mat#2″). Check the “Keep Trans.” option near the top of the Layers dialog.
  3. In the GIMP toolbox, set the foreground color to the desired color of the mat. If you don’t know the exact color, use Color Picker (eyedropper) tool and click in the mat somewhere to set the foreground color.
  4. Double-click the Bucket Fill tool. In the Tool Options dialog select “FG Color Fill” (and leave this dialog open). Select All (Ctrl+A) in the image and click on the mat to fill it with smooth color.
  5. Back in the Tool Options dialog, select “Pattern” as the Fill Type. Open the Patterns dialog (Dialogs/Patterns).
  6. Select a pattern (and leave the Patterns dialog open, for the moment). In the Layers dialog, select the Texture Bump Map layer for the mat. In the image window, do a Select All (Ctrl+A). Click in the image to fill the Texture Bump Map layer with the new pattern. Normally this layer’s visibility is toggled off, so you might only notice the change in the icon in the Layers dialog; toggle the visibility of the layer for a moment if you want to verify/view the pattern fill.
  7. Now select the mat layer. In the image window run Filters/Map/Bump Map. Select the Texture Bump Map layer as the bump map, adjust parameters appropriately and click OK. Voila!
  8. If you don’t like the texture, Undo (Ctrl+Z) the bump map and go to Step #6. Repeat with different patterns until satisfied.
Example #3Q: How do I change the intensity of the inner drop shadow on a frame?

A:

  1. In the Layers dialog, choose the “Shadow” layer above the frame.Using the Opacity slider, adjust the shadow intensity.
Example #4Q: How do I change the color/pattern/texture of a frame?

A: Reread examples #1 and #2.

  1. Check the “Leave Bevel Bump Map” option when creating the frame.
  2. Select the frame layer. Check the “Keep Trans.” option near the top of the Layers dialog.
  3. Now double click on the Bucket Fill tool and in the Tool Options dialog, select “Pattern” as the Fill Type. Open the Patterns dialog and select a pattern. In the image window, Select All (Ctrl+A) and then click to fill the frame with the new pattern.If you’d prefer to fill with a color, do that instead.
  4. If you want to texture the frame, do so as described in example #2 using the Texture Bump Map layer and the Bump Map filter.
  5. Finally, run a last Bump Map, using the Frame Bevel Bump Map as the (suprise!) bump map.

Note: the text at the bottom of the inner mat was added after everything else (by selecting the first mat layer and using the Text Tool). If could have been added anytime after the inner mat was created, however.

If you make a great, unique frame using this script I’d like to see it!

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

The Shocking Blue Green Theme. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 145 other followers

%d bloggers like this: