Image Editor

The Image Editor is a powerful facility to edit and scan pictures.

In this tutorial we will take a wedding photograph and perform 7 different exercises.

You will learn how to :-

make the photo brighter

crop a rectangular area from the postcard

turn the photo into an old style sepia tone print

repair major defects on the photo

This is the photograph before editing. Note - We had to make the photo brighter in our first exercise to see what we were editing!

Copyright GENP 2005. Wedding photo before

This is the photograph after repairing the defects. Note - The graphic is far larger than would be practically used in reports.

Copyright GENP 2005. Wedding photo after

Throughout this tutorial we will use a graphic and manipulate it in various ways. This graphic is 'Wedding_845x533_Bright.bmp'. The graphic was a postcard size photo, fairly dark with many defects. It has been brightened and resized to 845 by 533 pixels.

We will also use a test database in which to do our manipulations. So firstly create a GenBase named Test.

The postcard was badly damaged. It has silver fish damage on the rear. The man in the kilt has his face damaged by a stain that goes right through the paper. The man sitting on the right has a crack through his suit. There are also scratches and other marks! (The postcard was purchased at a fair in Victoria and nothing is known about the people.)

In this tutorial we will carry out the following exercises :-

  1. make the postcard brighter

  2. crop a rectangular area from the postcard

  3. turn the graphic into an old style sepia tone print!

  4. remove black dot from hat of bridesmaid on left

  5. fix the crack on the man's suit

  6. repair the stain on the man's head

  7. remove the man (standing on right) into his own graphic

1. Make the postcard brighter

In this exercise the original scanned image which looks dark will be made lighter.

Open the Test GenBase.

In the Media Manager use Edit | Add Image to add the image 'Wedding_845x533.bmp' as an External image into option GenBase. The upshot of this is that the image will be copied to the Media subdirectory of the GenBase. In the Media Manager use Edit | Edit to see the image editor.

Before we perform the brighten operation we will ensure that the image we are editing stands out in the edit window. As the image is black and white and the background is a chequered grey we want to clearly see the image.

Choose Image | Background. You will now see the 'Color Select' dialog. Click the mouse in the large colored rectangle. (The color will probably be red.) The selected color will appear in the small color rectangle at the top left.

For an effect that will really stand out we are going to choose a pink background. So now click on the vertical color bar on the right hand side somewhere in the pink part of the spectrum.

Click the OK button.

With a pink background our black and white graphic really stands out!

Choose Image | Color Adjust. When the Preview dialog appears the Contrast tabsheet will be visible.

The Brightness setting is the one we want.

Either move the slider, or click to the right of the slider until the figure of 20 appears. Now click the Preview button to see how the image may look.

Click the OK button. The image will now appear brighter. Save the image.

The best way to see the effect of what we have done is to click the Undo button. By doing this the image will be replaced by the original. The image will appear to visibly darken.

2. Crop a rectangular area from the postcard

We used this technique to provide many of the Before images for this tutorial.

Open the Test GenBase.

In the Media Manager used Edit | Add Image to add the graphic as an External image into option GenBase.

In the Media Manager use Edit | Edit to show the image editor with the graphic.

Just click in the image and drag the mouse to map out a rectangular area.

The following graphic shows this step ('Wedding_Select.jpg').

        Wedding photo with selected area

Note the cursor positioned under the crack on the postcard.

Choose Edit | Crop. The selected rectangular area will appear in its own window.

You can then save the image under its own name. (We saved it as 'Before\Wedding_Crack.jpg'.)

3. Turn the graphic into an old style sepia tone print

This exercise will turn our black and white graphic into an old style sepia tone print!

1. In the Media Manager use Edit | Edit to show the image editor with the graphic.

2. Choose Image | Color Adjust. When the Preview dialog appears choose the RGB tabsheet. This abbreviation RGB stands for Red, Green and Blue.

3. We will increase the Red and decrease the Blue. Either move the Red slider, or click to the right of the slider until the figure of 20 appears. Either move the Blue slider, or click to the left of the slider until the figure of -20 appears. Now click the Preview button to see how the image may look.

4. Click the OK button. The image will appear as an old style sepia tone print.

4. Remove black dot from hat of bridesmaid

This exercise will remove the black dot from the hat and replace it with the mostly white hat color.

1. In the Media Manager use Edit | Edit to show the image editor with the graphic 'Before\Wedding_Dot.jpg'.

        Detail showing black dot on hat

2. We will now enlarge the image. Choose Image | Resample. Ensure the 'Aspect ratio' is selected. Key a 'Width' of 285. Click the OK button. The graphic should now be large enough for us to readily see the following process. Note - In another exercise we will use a different technique to enlarge the image.

3. We will now focus on the black dot. Just click in the image and drag the mouse to map out a rectangular area just surrounding the black dot. See the image 'Wedding_Dot_Select.jpg'.

        Black dot selected

4. Choose Tools | Effects. The detail from the Preview can be seen in the image 'Wedding_Dot_Preview.jpg'.

        Detail from Preview

5. Our aim is to make the rectangular selected part of the image become a uniform grey color. Choose the 'Morphing filters' tabsheet. Choose a 'Maximum' filter and 'Window size' = 15.

6. Click Preview. The 'Result' will almost be uniformly grey.

7. Click the '<<' button. This will copy the 'Result' to the 'Original'.

8. Click OK. The image should have been updated. The rectangular selected area is very small and may obscure the change. Click elsewhere on the image to make the selected outline disappear.

9. Choose Image | Resample. Change 'Width' to 95. (We saved it as 'After\Wedding_Dot_after.jpg'.)

        Black dot fixed

5. Fix the crack on man's suit

Difficulty Level - Advanced.

This exercise will fix the crack appearing on the man's suit.

1. In the Media Manager use Edit | Edit to show the image editor with the graphic 'Before\Wedding_Crack.jpg'.

        Show crack on man's suit

2. We will now enlarge the image. Click on the 'Zoom' tool button. The cursor will change to the shape of a magnifying glass with a + sign inside. Whilst the cursor is over the image click once. The image will enlarge.

3. We will now focus on the crack.

4. Click on the 'Select' tool button. Select a rectangular area.

5. Choose Tools | Effects. Our intention is to somehow remove the vertical white stripe. Choose the 'Morphing filters' tabsheet. Choose an 'Opening' filter and 'Window size' = 1. Click OK. See the image 'Wedding_Crack_Effects.jpg'.

Morphing Filter working on crack

6. Repeat this process with different sized rectangles. The final image is 'Wedding_Crack_after.jpg'.

        Crack fixed

6. Repair the stain on man's head

Difficulty Level - Advanced.

The stain on the man's head and surrounding area is a difficult fault to repair. You may be forced to get out a purpose built photo editor and clean up the graphic pixel by pixel.

However we can achieve an acceptable result by using a combination of techniques.

The first technique is to use a Threshold to block out the dark areas and then use a Morphing filter on this.

First Technique.

1. Choose Image | Color Adjust.

2. Choose the 'Equalization' tabsheet. Move the Threshold pointer until the Preview shows the dark areas are blocked out by black pixels. See the image 'Wedding_Stain_after_First.jpg'. 

Equalization tabsheet

3. Click OK. The original now will effectively hold the wanted color on the left and black on the right.

4. Choose Tools | Effects.

5. Choose the 'Morphing filters' tabsheet. Choose a 'Maximum' filter and 'Window size' = 30. Click Preview. See the image 'Wedding_Stain_after_Second.jpg'. Click OK.

The problem with morphing is that some of the variation in the area we want to keep is removed.

Second Technique.

Due to the variation in the weather board background we will use the technique of rectangle Select, Copy, then Paste to Rectangle.

1. Click on the Select tool button. We will deal with one weather board first. Map out a rectangular area.

2. Choose Edit | Copy. The rectangular area is copied to the clipbloard. Move the selected rectangle over an area you want to alter.

3. Choose Edit | Paste to Rect. See the image 'Wedding_Stain_after_OneBoard.jpg'. Now repeat for the other weather boards.

       

4. We now need to improve the weather board edges. Select a rectangular area overlapping an edge and Copy. Paste to Rectangle along the weather board edges. See the image 'Wedding_Stain_After_ManyBoards.jpg'.

       

5. Repeat this process with different sized copy rectangles. The final image is 'Wedding_Stain_after.jpg'.

       

7. Remove the man into his own graphic

This exercise will remove the man who is standing on the right into his own graphic. By this means you can have him appear on reports without other individuals appearing in the same graphic.

1. In the Media Manager use Edit | Edit to show the image editor with the graphic 'Before\Wedding_Remove.jpg'.

        Before shot shows man in group

2. Now select the 'Select Polygon' button and proceed to outline the man. Click along the outline of the man. Don't forget to double click at the end.

Tip - Zoom in on the graphic to make it easier to see his outline. 

See the image 'Wedding_Remove_Polygon.jpg'.

Man in group outlined

3. Choose Edit | Crop. The man should be visible in his own graphic.

4. When you have carried out this step the dimensions of the graphic may not be what you want. (In our case it was 81 by 93 pixels.)

5. Choose Edit | Resize. Ensure that 'Aspect ratio' is selected. A width of 100 could be suitable. The graphic will look like 'Wedding_Remove_Left.jpg'.

       

6. We now need to centre the man. Choose the 'Select' tool button and place a rectangle surrounding the man. The graphic will look like 'Wedding_Remove_Left_Select.jpg'.

       

7. Choose Edit | Cut. Don't be alarmed but the man will disappear. (It is stored on the clipboard.) Move the rectangle so it is centered in the graphic.

8. Choose Edit | Paste to Rect. The man will appear within the centered rectangle.

9. Save the image. See the image 'Wedding_Remove_after.jpg'.

        Man extracted to own graphic

-----

Now download the various graphics so you can try out the exercises. We have included before and after graphics.

'TutImageEditor.zip'     Size 445,497 bytes. 4  Aug 2005.

2005 Jun 30

 

http://www.genp.com.au

Copyright 1986 - 2009  GENP.  All rights reserved.