Creating Virtual Mats and Frames with The GIMP
Warning: maximize your browser window now! Wide images ahead…
||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… 🙂
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.):
|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:
- Color: use the color in Frame Fill Color
- FG color: Use the current foreground color in the GIMP toolbox
- BG color: Use the current background color in the GIMP toolbox
- 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.
- 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?
- In the Layers dialog, choose the mat layer (here I’ll use “Mat#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?
- 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).
- Now select the mat layer (here I’ll use “Mat#2”). Check the “Keep Trans.” option near the top of the Layers dialog.
- 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.
- 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.
- Back in the Tool Options dialog, select “Pattern” as the Fill Type. Open the Patterns dialog (Dialogs/Patterns).
- 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.
- 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!
- 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?
- 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.
- Check the “Leave Bevel Bump Map” option when creating the frame.
- Select the frame layer. Check the “Keep Trans.” option near the top of the Layers dialog.
- 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.
- 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.
- 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!
No comments yet.