Tool Time

No, my name isn’t Tim.

I think it is important to keep up with your tools as a developer. Whether it is brushing up on your javascript or polishing your image manipulation skills. The other day I saw a set of filters being sold for Photoshop. While the end images were quite nice I thought to myself, “Why would someone buy that, it is already included in the Gimp!”

I haven’t used Photoshop (PS) in a number of years. It simply became too pricey unless I was to shift production over to an Adobe only pipeline. Since I’m just freelancing on the side for now, this wouldn’t be cost effective. Enter the Gimp (GNU Image Manipulation Program). It is a really wonderful PS-like program. Again, I haven’t used PS in years and I have never used PS in conjunction with all of the other wonderful tools from Adobe, so I might be missing out on a lot!

Back to the point. The Gimp is great for all of the day-to-day tasks I need, like re-sizing, changing resolution, compressing photos and changing file type. It is also great for content creation and manipulation. Back to the original point of my post. I saw this filter being sold for PS that could take two images and use one as a screen for the other. The end result is a merge with one image overlaying the other and masking out parts. This seems rather basic and like something PS should have, the Gimp certainly does! Then I thought, maybe this exists, but people don’t know about it. Enter tool time!

In GIMP, this filter is known as the “Depth Merge” filter, and it is found on the “Combine” sub-menu in the filters menu. It’s use is pretty simple. Let’s start with a really simple example. First you pick out two images to merge, say a woman’s silhouette and a forest.

One drawback of this filter in GIMP is that the images need to be the same size. Your results may vary, but I usually get the best images if I keep the resolution of the mask fairly high if there is a lot of fine detail. In this case I kept the silhouette at full size and then scaled and cropped the forest.

Once you have the images equalized for size you need to make your masks. In this case, I’ve cheated a little by using a black and white image. In this case I can use the image itself as a mask. Otherwise, I would duplicate the image, turn it into a greyscale, set a threshold and then do any hand editing to get the mask how I would like it (I’ll show that below.) Within the filter there are several options. First, you have to select the images to be used (both should be open). In addition, the filter will ask you to select the mask to be used. In this case I’m using the images as the masks, as well. Next you have the Overlap and Offset sliders. These will control the amount of bleed between images and the sharpness of that bleed over. You’ll just have to play with them. In this case, since I’m replacing the entire silhouette with the forest image so I don’t really have to make any adjustments.

Click OK and your image is ready to use. Like I said, this was an easy example. Let’s step it up a small notch.

In this case I had to change my settings to get the look I desired – I wanted to replace the model’s hair with the forest as a full bleed-through. As I outlined earlier in the post, I converted the face to grayscale and set a threshold. I then did a little free hand editing to make sure the eyes weren’t lost. So in this case I used the original image of the face as the source and the thresholded image as the mask, along with the forest image as both source and depth map.Then, to get the right degree of bleed I had to change my Offset and Scale 1. Scale 1 and Scale 2 are essentially fine controls for the Source 1 and Source 2 offsets. Again, you’ll have to play with them for awhile to get a feel for how they impact the final image.

I hope this was helpful to someone out there. If so, give me some feedback or ask for some help in the comments!

Published: 03.29.2016

In: Legacy, Programming

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.