Sunday, November 30, 2008

Using GIMP to process product photos-1

For objects that stand out from the background

Many software packages have the power to process a product photo for enhanced presentation. For this tutorial we will use GIMP, a very powerful, free image manipulation program. You may download the windows version from http://downloads.sourceforge.net/gimp-win/gimp-2.6.3-i686-setup-1.exe

Now that we have the right software tool, we're ready make our product photos look great. This tutorial takes about 20 minutes to go through, but after a few practices you will be able to process a photo in just a few minutes. Here's the summary of what we'll do:
  • crop photo (to a square for main photo, or to any aspect ratio for supporting photos)
  • adjust brightness
  • select background area to remove with fuzzy select
  • delete selected background
  • create drop shadow (optional, recommended)
  • scale image
  • save image
We'll practice on this photo below:


Ready to give it a try? Here we go!

1. Start the GIMP program
2. Open image file

  • Press Ctrl+O for the file open dialog, then select image file from your computer. When the file opens in GIMP, it'll look something like this:

3. Crop photo
  • Press Crtl+B to focus on the Toolbox window (or simply click on it)
  • Press R to activate the "Rectangle Select" function
  • The main image of the product needs to be a square. To achieve this, tick the "Fixed" check box, choose "Aspect Ratio" in the drop-down menu, and type "1:1" in the following box, as shown below. Supporting product images do not need to be square, so you do not have to tick the "Fixed" check box.
  • Use cursor to drag a box around the product. To not waste valuable space, you'll want the box to fit the product fairly snugly.
  • If the box is not centered on the product, click and drag the middle of the box to move it around and center it.

  • Press Alt+I to go to "Image" menu then press C to "Crop to Selection". At this point you will be left with a square image.
4. Adjust brightness
  • Because our white photo booth skews the camera's automatic white balance and makes photos look darker, many photos will benefit from a little boost in brightness. Press Alt+C to go to the "Color" menu then press R to choose "Brightness-contrast".
  • Adjust brightness by dragging the brightness bar. This is where your sense of aesthetics comes in. Adjust the brightness to what you think looks best. Be careful not to overdo it, otherwise the photo will look washed out!
5. Remove background
  • Press U for "fuzzy select" function
  • For the settings, make sure check boxes for Antialiasing, Feather edges, and Select transparent areas are all ticked.
  • For Mode, choose the second icon for "add to current selection"
  • For "Feather edges", set radius to around 5 or smaller. This may need to be adjusted later when tracing the product.
  • For "Threshold", set it to around 10-30 to begin with.

  • To start tracing the image just click on the background, not too close to the product.
  • A trace of dotted lines should appear, roughly circling the product.
  • Depending on how uniform the background is and where you clicked, the dotted lines may hug around the product closely right after the first click. If it does not, then click again on the background, near where the dotted line deviates from the product.
  • If a click results in a bad selection, you can always use Ctrl+Z to undo what you have done.
  • To refine the tracing of the dotted lines so that it will hug the product even more precisely, lower the radius and threshold numbers.
  • To see each section of the product more closely press Shft+ (the shift key and plus sign key) to zoom in. To zoom back out, just press - (the minus sign key).
  • Now we can click closer to the edge of the product for the dotted line to trace the product more precisely.
  • If the dotted line eats into the product, either use Ctrl+Z to undo, or select the third icon for Mode, "subtract from the current selection". In this setting, instead of clicking on the outskirts of the product, click inside the product for the dotted line to move outwards.
  • This process of getting the lines to the product very precisely may take some trial and error, so play around to see what works best. The finished result should look precise. Like this:

  • Press Alt+S for the "Select" menu then press P to choose "To Path"
  • Again, press Alt+S for the "Select" menu but this time press O to choose "From Path"
  • Now press Delete key to delete the background so only the product is left.

6. Create a drop shadow (optional, recommended)
  • The product may look too bare on the white background. In this case, a drop shadow will soften the look, giving higher quality presentation. Here's how we do it.
  • Press Ctrl+I to choose "Invert" so the product is selected instead of the white area.
  • Press Alt+R to go to the "Filters" menu.
  • Select "Light and Shadow" then select "Drop Shadow".
  • Once "Drop Shadow" is selected, the dialog box below will appear.
  • Adjust the settings for Offset X, Offset Y, and Blur radius to get desired drop shadow. It may take a few trys to get the image looking right. The numbers below can serve as a starting point.
  • Also, make sure the tick box for "Allow resizing" is not ticked.
  • Now we'll pick a gray as the color of the shadow. Click on the color box to go to "Script-Fu Color Selection"
  • Drag the crosshair along the bottom of the color chart to select a shade gray. For dark-colored products, it is better to use a lighter gray for the drop shadow. The "Current" bar at the bottom displays the color that will be used. Click "OK" to apply.

  • With the drop shadow created, press Shft+Ctrl +A to select "None", to get rid of the dotted line.
  • The image should now look something like this:

  • Press Alt+I to go to "Image menu then press F to flatten the main image layer and the shadow layer into one.

7. Scale the image

  • For the main product image: we want the same image saved in two different sizes -- a smaller one between 200x200 and 300x300 pixels, and a larger one up to 640x480 pixels. If the original image size is larger than 300x300 pixels, then scale it to 300x300. Otherwise do not scale it. KindMinds accepts main product images between 200x200 and 300x300. If the picture you're working on will be used as the main image, remember to save a larger version of it (up to 600x600) before you scale it to 300x300! See step 8 for file saving instructions.
  • For supporting product images, we recommend a width of 640 or smaller and a height of 480 or smaller.
  • Press Alt+I then press S to open the scale image dialog box. Make sure the chain icon is linked (not broken). Then type in either the width or the height; the computer will calculate the other automatically.

  • Click "Scale". After scaling the image shrinks as below.

8. Saving final image
  • Press Shft+Crtl+S to go to "Save As"
  • Type in a name for the product and make sure to save it as a jpg file by typing ".jpg" after the name.
The final image looks like this:
Congratulations, you're an expert now!

Samples of other products processed using the same technique
Feel free to download them as practice material!



Sunday, November 23, 2008

Using GIMP to process product photos-2

For objects that may blend into the background

Whereas the previous tutorial
Using GIMP to process product photos-1 works best for objects that stand out from the background with crisp edges, this tutorial gives a method that works even if the object does not stand out from the background. It differs from the previous tutorial only in step 5, the method for removing background.

The product below has similar color to the background, making it hard to isolate using our previous fuzzy select method; but it is easy to define the product's edges with the paths tool.


Here's how we do it:

Steps 1 to 4:
Start GIMP, open file, crop photo, and adjust brightness. Please see Using GIMP to process product photos-1 for step-by-step instructions.

5. Remove the background
  • Press B for "Paths" function.
  • To outline the product use the cursor to place points around the edge of the product. Place a point wherever there is a curve or corner. Continue doing so until the entire product is outlined and the first and last dots join together.

  • To trace the products more precisely, click on the lines and move it around until it traces the product as closely as possible. To adjust the curvature of the lines, you can also click on the little squares next on each of the points and move it around. These little squares will only appear once you click on the point you wish to work on.
  • To see each section of the product more closely press Shft+ (i.e. the shift key and plus sign key) to zoom in and just press - (i.e. the minus sign key) to zoom out.

  • If the points placed earlier are not in the right position, it can also be adjusted by clicking on it and moving it to the desired spot.
  • If the changes made are not desired, press Ctrl+Z to undo the previous action.
  • Keep doing this until the lines trace the product nicely.

  • Press Shft+V to choose "From Path"
  • Press Ctrl+I to choose "Invert"
  • Press Delete key to delete the background so only the product is left.

Steps 6 to 8:
Create drop shadow, scale image, save file. Please see Using GIMP to process product photos-1 for step-by-step instructions.

Here's the finished image:


Sample of another product processed using this technique
feel free to download the photo as practice material!