Tuesday, June 19th, 2012

Transparency and the Gimp

 

One of the most confusing things for Photoshop users will be the concept of a transparent layer in Gimp.

Consider the situation where you open an image such as this hand drawn frame here. The image is a BMP image and what I want to do is grab the middle out of the frame so that I can put something behind it.

 

 

If this were Photoshop, I would convert the background layer to a regular layer by double clicking on it and press Ok. Then I would target the Magic Wand tool and click in the middle of the frame to select the middle area then press Delete to make it transparent so I can drop an image in behind it.

 

 

If you try this process in Gimp, all you get is an extreme level of frustration as nothing seems to work. Select and delete does absolutely nothing !

Here’s the solution. With the layer with the image on it selected, right click and choose Add alpha channel. This then allows you to select an area on the image using the Fuzzy Select tool, and press the Delete button. Then choose Select none and you will have a transparent middle to your image. It’s an easy process once you understand what’s happening but an extremely frustration one until you do.

 

 

Helen Bradley

Friday, May 11th, 2012

5 top tips for working with Gimp

I know that a lot of you use Gimp and, in the interests of taking a step away from Photoshop for a minute, here are 5 of my top tips for working with Gimp.

Rounded corners

Gimp makes it dead simple to round the corners of an image. To do this, choose Filters > Décor > Rounded Corners. A dialog will open. Select the Edge Radius, which is the amount of curve, and if desired, click to add a Drop Shadow and then set the Shadow Offset and Blur Radius. You can select to work on a copy of the image (rather than the original), and select whether or not to add some background behind the curved corners – the current background color is used for this. Click Ok to round the corners of the image.

Reassign keys

When I use Gimp, I sometimes forget and use Photoshop keys for things like deselect. Unfortunately in Gimp, the Photoshop deselect keystroke duplicates an image! You can, however, remap your keyboard shortcuts by choosing Edit > Keyboard Shortcuts. So, for example, to map the Ctrl + D keystroke to the Select > None option, click to open the Select menu, locate the None option and click it so that the words New Accelerator appear in the Shortcut column. Then press the keystroke to use – I chose Ctrl + D, which is the Photoshop equivalent. Because this key combination is already used a warning appears – if you are ok with replacing the shortcut, then proceed to assign the new shortcut key.

When you change or reassign a shortcut, Gimp is smart enough to add the new shortcut to the appropriate menu so the Select menu here shows the newly assigned shortcut.

Move the selection mask

It is so much easier in Gimp than in Photoshop to move the actual selection marquee once you have made it. To see this at work, make a selection, then click the Move tool. Make sure that the Move option is set to Selection in the panel and you can now drag the selection into a new position. This works for circles, rectangles as well as selections made with the free select tool. Once you’re done, return to the tool to perform another task such as Ctrl + Alt + drag to move the selected area or Shift + Alt + drag to copy it.

Merge to a new layer (and keep the original layers)

One command that is useful when you need to flatten an image but where you don’t want to lose the layers you have already created is the one which flattens the visible portions of an image to a new layer. This layer is at the top of the stack but is created in a way that leaves the original layers still in place. In Photoshop you do it by pressing Ctrl + Alt + Shift + E. In Gimp, choose Layer –> New From Visible. Now you can, for example, sharpen the image but, if you need to make changes to the image, you can delete the top merged layer, adjust the image on the layers below and then remake the new merged layer and sharpen it.

Crop Tool Smarts

The Crop tool in Gimp includes a range of cool options. When you select it, check out the panel options. You can, for example, crop just the current layer (or all the image) or you can select the crop area from the middle out (rather than drawing from one corner). You can crop to a fixed aspect ratio or a fixed width (height is variable), fixed height (width is variable), or set both height and width. From the list which shows No Guides, you can choose to display a Rule of Thirds overlay, Center lines or Golden Sections to help you create a well composed image. Enable Highlight to see a dark border around the area you plan to crop to.

So, there are my 5 top Gimp tips. It is over to you. What is your favorite Gimp tip to share with others?

Helen Bradley

Thursday, March 15th, 2012

Content aware resizing in Gimp

In a previous post, I looked at content aware resizing in Photoshop CS4 http://projectwoman.com/2009/09/smart-scaling-with-content-aware-scale.html which is the same as in CS5. I also mentioned the online application called Rsizr http://www.rsizr.com. Today I’m going to show you a plug-in for Gimp that does pretty much the same thing.

The tool is called Liquid Rescale which you can download from here: http://liquidrescale.wikidot.com/. Close Gimp, install the application and then reopen Gimp and you will see the application on the Layer menu.

This plug-in is an alternative to the crop tool. You use it to reduce an image’s size but, where the crop tool removes the data from one or more sides of an image, content aware resizing removes it from the middle of the image. This gives you basically the same looking image but smaller in one dimension. You might use this, for example, to remove some empty area from the middle of an image where the more interesting parts of the image are to either side of it.

The same tool can scale an image up to make it larger in one direction – and this time it will create extra data in the image to fill the space. You might use this, for example, where you have a rectangular image that you want to make into a square image without losing any detail.

To see how this can be done, I’ll take this beach image and size it down from 3571 pixels wide to 3000.

Open the image in Gimp and choose Layer > Liquid rescale. When the dialog appears, click the Output tab and set Output Target to a New Image. Enable the Resize image canvas checkbox and click Ok.

Set the new image width – I set this to 3000 but made sure that the link icon was disabled as I don’t want the height altered. Click Interactive and wait as the image is resized.

The program resizes the image by removing unimportant details from it and keeping what it understands to be the important bits. This is the result:

If you find that some elements in the image are squeezed or damaged by the process, you can create a mask to prevent this from happening.

To do this, click the original image again and choose Layer > Liquid rescale and set up the Output tab options.

Click Feature Masks and, to create a protective mask, click the Feature Preservation Mask option and click New. The paint color will be set to green so select a brush, enlarge it to an appropriate size and paint over anything on the image that you do not want to change as the image is resized.

In my case, that is the swimmer at the front of the image and the lifeguard and boards at the back. I’ve added some other bits I don’t want skewed out of alignment like the vertical poles too. Anything else can be adjusted except these elements. When you’re done, click Ok.

Type the size for the new image and click Interactive and wait as the image is resized. Here I chose for the image to be reduced from 3571 to 2500 pixels wide, and the surfer, boards and flags have all reduced well. The protected areas have not been touched.

The plug-in also has a tool that you can use to remove elements from the photo. In my image let’s take out the large pole in the foreground. In this case you use a Feature Discard Mask – and paint in red over the area that you want removed from the image. Adjust the strength to the highest value, set the width value by clicking Auto size: Width so that the image is scaled to the appropriate width for the item you are removing and click Interactive.

In this case, the flag has gone but we’ve got a bit of a repair job to do with the rest of the image to fix it up. It would require some work with the clone tool to fix up the image but Liquid rescale has got us some part of the way towards where we are headed.

You can also use the plug-in to enlarge an image. In this case, we’ve enlarged the image to create a square image.

The rescaling process isn’t perfect but generally you’ll get a good enough result that with a small amount of cloning afterwards using the clone tool you’ll be able to produce a realistic result.

Helen Bradley

Friday, February 10th, 2012

Ho-Hum to Wow! in Gimp

 

Some time ago I wrote a blog post http://projectwoman.com/2009/03/photoshop-color-that-packs-a-punch.html which involved using the LAB color space to adjust an image. In the interests of those of you who use Gimp, this blog post is a revisit on the topic of dragging color out of lackluster images this time using Gimp.

One of the hidden secrets of Gimp is that it supports the LAB color space so you can get access to the L, a and b channels in an image. This adjustment therefore produces similar results to those you can achieve with my earlier post using Photoshop it’s just that the process in Gimp is a little different.

Start out with an image that could use a color boost. This image of a statue over a door in Paris is very monochromatic so it’s a great contender for this process.

Start by making sure your Layers panel is visible – if not, choose Window > Dockable Dialogs > Layers (or Control + L) to display it. Right click the Background layer and choose Duplicate Layer. Select this new top layer.

To convert the image to LAB color, choose Colors > Components > Decompose. From the color model dropdown list, select LAB. You will want to decompose to layers so select Decompose To Layers and click Ok.

You’ll have a new image on the screen with three layers. Right now you’ll be looking at the L channel and below it in the Layers palette are the A and B channels.

Disable visibility on the L layer and click the A layer to select it. You should have a dark murky almost negative looking image on this layer. Choose Colors > Curves and adjust the curves by dragging the top right and bottom left points on the curve one, two or three boxes inwards on the grid. You can read off the values so pairs of values  like (30,0) and (225,255) or (64,0) and (191,255) are good.

You need to make sure the line goes through the middle of the grid, or you will get an unwanted color cast in the final image. This A channel controls the Magenta and Green in the image and you’re boosting it now to very high levels. Click Ok.

Repeat this by disabling the visibility on the A channel and do the same on the B channel. This is the Yellow/Blue channel. When you’re done, turn back on the visibility of all three channels. You should see no difference in the image at this stage.

If desired, you can adjust the contrast in the L channel using curves – this will give you some additional boost in contrast in the final image. The L channel is the luminosity channel and it has no color in it at all so you can create a different shape curve here and there is no requirement for the line to go through the middle of the grid.

When you’re done, choose Colors > Components > Recompose. The layers will be recomposed back into the original image.

To see it, you will need to close the LAB version and return to your original image. Because you’re working on a duplicate layer, you can now blend the top layer by selecting a different blend mode such as Overlay for the top layer and then adjust down the Opacity to suit.

Helen Bradley

Tuesday, February 7th, 2012

Create a collage in Gimp

One task I perform regularly in Photoshop and Lightroom is to assemble multiple images on a single page for printing.  I love displaying my photos, for example, as triptychs –which are three side by side images.

I’ve posted before on the process in Lightroom here (http://projectwoman.com/2009/07/creating-a-triptych-in-lightroom.html) and here (http://projectwoman.com/2009/10/how-to-select-and-compose-a-triptych-in-lightroom.html)and today I’ll show you how to do this in Gimp using a set of templates I have created for you and that you can download free.

These templates work with both Gimp and Photoshop and you can find them here: http://projectwoman.com/articles/45PhotoshopTemplates.html

Unzip the files and open the one to use in Gimp along with the images that you want to use. I’m using the Triptych.psd file.

Start by viewing the template you are using and, in the Layers palette select and discard the top three layers which include the instructions for using the template in Gimp and in Photoshop and Photoshop Elements.

Select the first of your images, choose Select > All  and then select > Edit > Copy to copy the image to the clipboard.

In the template click on the layer marked A and choose Edit > Paste as > New Layer. This pastes the image from the clipboard into the layer immediately above layer A.

Click the Move tool (set it to Layer) and drag the image over the top of the shape on the right. If desired, click the Scale tool and scale the image to size it larger than the black rectangle.

Move the portion of the image that you’re most interested in seeing over the shape.

Now, to crop the image to size, click layer A, right click and choose Alpha to Selection.

Now select the Clipboard layer that you’ve been working on, choose Select > Invert and press Delete.

The image will be clipped to size using the template shape as a guide to the size. Choose Select > None before continuing.

Repeat this process for layers B and C – select and copy the image to use, click the layer you’re working with (B or C) and choose Edit > Paste As > New Layer.

Move the image into position and scale it if desired. When scaling, making sure to lock the width and height so that the image is scaled in proportion.

Right click the layer you’re working with – Layer B (or C) and choose Alpha To Selection. Click your newest clipboard layer and choose Select > Invert and then Delete.

When you are done you should have all 3 images in position.

This image has a background layer behind the pictures which currently shows white. If you prefer to add a solid color behind everything, delete this layer and add a new layer filled with your choice of color. Here I’ve added a new dark grey filled layer.

You can finish off the design with some text or simply save the resulting image.

These storyboard templates are a good place to start with your picture layouts. You can find similar templates elsewhere on the web so start with a search for “Free Photoshop Clipping Mask Templates” or “Free Storyboard templates”

 

Helen Bradley

Thursday, June 4th, 2009

Rsizr – Image scaling on steroids

While Photoshop, Lightroom and Photoshop Elements can resize images for you, only Photoshop CS4 supports content aware scaling. I’ll talk about this new feature in Photoshop in another post but if you’re interested in playing with content aware scaling and you don’t own Photoshop CS4, check out Rsizr.com

Rsizr resizes images by removing the unnecessary content from them or by stretching neutral areas of the image to make the picture bigger. It’s worth a visit just to see it at work.


Start by uploading an image that you want to resize. This should be a JPEG, .PNG or GIF file with a height and width of less than 2,880 pixels – in practice, so you can see what’s going on quickly, upload an image sized smaller than this.

Once the image appears in the dialog you will see tabs with buttons for various functions including the File Function tab, View functions, Resize and Retarget functions.


The program uses a seam carving technique to remove portions of the image. To get started drag the horizontal slider in the top of the window in to the size you want the image to be resized to. Click the Retarget button and watch as the seams are created (they’re the red marks you can see in the image) and the file shrinks in size.


Once the seams have been created, you will see a set of sizing handles around the image which you can use to resize the image either to make it wider or narrower.


You can protect areas of the image or mark them for deletion by clicking the Preserve or Remove indicators on the retarget functions tab and paint over the area to keep or remove.


You might do this, for example, if you see some distortion in the resizing process and want to protect key portions of the image.

The rescale and crop tools are similar to what you’re used to using in your photo editing software – it’s the retarget option which is unique.

If you’re interested in learning more about seam carving technology, visit: www.seamcarving.com to see a video describing it.

Stop Press! There is a cool plug-in available for the Gimp which brings content aware scaling/seam carving to the Gimp. For more information and to get the download, check here: http://liquidrescale.wikidot.com/ and note that the Gimp version is called Liquid Rescale! Just in case you thought there weren’t enough ways to refer to the same thing.

Helen Bradley

Sunday, February 25th, 2007

GimpSHOP – all about layers, layer palettes and masks

GimpSHOP is Gimp with a great front end that makes it work much like Photoshop which you can find free for downloading here: GimpSHOP.

GimpSHOP, like any good photo editing program supports layers, and layer masks. These features aren’t always simple to get your head around but when you do, you’ll find they’re invaluable tools to use for photo editing tasks. Here, step by step, is how to work with them:

Step 1
To display the Layers palette press Shift F7 or choose Window, Layers. To add a new layer choose Layer, Duplicate Layer. There are no adjustment layers available in Gimp or GimpSHOP so this process keeps your original photo layer safe in case you need to use it later on.

Step 2
To adjust the levels in the image to improve its tonal range, choose Image, Adjustments, Levels and drag the sliders on the Input area of the dialog to adjust the contrast. The sliders under the chart should be moved inwards so they appear under the ends of the chart. The middle slider adjusts the midtones. Click Ok to apply this to the layer.

Step 3
To see how you can apply an effect or adjustment to this layer and blend it with the layer below, first create a duplicate of the top layer by choosing Layer, Duplicate Layer. Apply the edge detect filter by choosing Filter, Edge Detect, Edge and choose the Sobel Algorithm with the default value. This gives a new layer which is predominantly black and which displays the coloured edges in the image.

Step 4
Now, in the Layers palette, select the Divide blend mode from the dropdown list. Blend modes control how the top layer interacts with the layers below. Drag the opacity slider to the left to reduce the opacity of this layer so that some of the layers below show through thus mitigating some of the effect created by blending the layers together.

Step 5
To edit the effect the top layer gives to the image, use a Layer mask. Choose Layer, Mask, Add Layer Mask and choose White (full opacity) and click Ok. You should see no change in the image. Now select black or grey as the paint colour and paint the image to show part of the layers below through the image, thus effectively removing the effect of the blended edge filter. Paint with white to reapply the layer effect.

Step 6
The Layers menu offers tools for viewing a layer mask, applying it permanently to the layer, deleting it and making a selection based on it, etc.. You can also use the menu to configure the size of the thumbnail images by clicking by choosing Preview Size and then choose a view size from the list.

Helen Bradley

Monday, February 12th, 2007

Create a winning smile in GIMP

Shiny white teeth look great but, let’s face it, not all of us have the benefit of expensive orthodontics. Luckily, armed with some graphics software you can give yourself or your best friend a professional whitening job in seconds.

To whiten teeth, in GIMP, click your favourite selection tool and make a selection around the teeth. Take care to select all the tooth area but avoid including any of the gum line or lips. You may find the “Select contiguous regions tool” is the best to use. Set a feather by choosing Select, Feather and set a feather value of 1 or 2 if the image is large.

Choose Tools, Color Tools, Hue-Saturation and click the option button for the Yellows so you’ll adjust only the yellow coloring in the selected area. Reduce the intensity of the yellow by dragging the Saturation slider a little to the left. Check the Green and Red channels to see if altering their saturation has an effect and repeat as needed. Click on the Master button and drag the Lightness slider to the right to lighten the entire selection.

Helen Bradley