Friday 8 April 2016

Using gimp to create id or passport photos

This tutorial was created with Gimp 2.8.14 on Ubuntu 15.10 (wily).

Get a photo of yourself

Get someone to take a photo of you, making sure that you are directly facing the camera, with a straight face (no smiles for passport photos), with a white, evenly lit, background.

Open the photo in gimp

File -> Open

Set the size of the photo

The Australian passport photo guidelines state that the distance from the chin to the top of the head should be between 32 and 36mm. Let's scale it to be 34mm.
  • In the Toolbox select the Measure tool icon , or Menu: Tools → Measure
  • Measure the distance from chin to top of head (where it would be without the hair). For example 1900 pixels.
  • Calculate resolution in mm / pixels by taking the size of head in pixels divided by the desired head size in mm to get the resolution in pixels / mm. For example 1900 pixels (head size in photo) / 34mm (desired size on photo) = 55.88 or about 56 pixels / mm.
  • Image -> Print Size ...  and enter this value (56 pixels/mm) in the X (and locked Y) resolution.
You can now change the units (bottom of the window) when using the measure tool to show the measured size in mm, inches, or pixels.

Crop the image to size

Australian passport photos need be 35 to 40mm wide and 45 to 50mm high. We'll use 40x50mm as the desired size.
  • Select the crop tool in the toolbox , or Menu: Tools → Transform Tools → Crop
  • Drag anywhere on the image to create a crop box, then set the size to 40mm wide by 50mm high using units of mm.
  • Move (drag) the crop box to the appropriate position centred on your face.
  • Make sure "Delete cropped pixels" is selected.
  • Press enter to crop the image.

Tile the image

We will be printing to a standard 4"x6" (102mm x 152mm) photo (landscape format). This can fit 2 high and 3 wide of our passport sized photos.
  • Select Menu: Filters → Map → Tile...
  • units=%
  • unlink the width and height
  • Width=300% and Height=200%
  • tick "Create new image"
  • Click OK

Resize to photo paper size

If, in the previous step, you tiled to a new image you will need to set the scale (pixels/mm) again, so go to
  • Menu: Image → Print Size...
  • set X and Y resolution to 56 pixels/mm (or whatever you calculated in step 3 above).
Resize the image:
  • Set the background colour to a new colour for border of the tiled photographs
    • If the boarder around the image is black then some printing services will resize the non black part of the image to fill the paper. This will ignore all the careful scaling we have done and make your printed image the wrong size. To avoid this I'd suggest selecting a distinctive border colour like green which can be cut off with scissors after it has been printed.
  • Select Menu: Image → Canvas Size
  • units = inches
  • width = 6 (inches)
  • height = 4 (inches)
  • Click the Centre button
  • Resize layers = All layers
  • Fill with = Background colour
  • Click Resize

Reduce the image resolution/size

You now have a high resolution set of ID photos - but some photo printing services may not be able to cope with a photo of this size if you started with a high resolution picture of yourself - so it's probably a good idea to scale down the image before attempting to get it printed. Before you do this you may like to save the high resolution picture in gimp's native .xcf format (File → Save As...).

Resize the image:
  • Menu: Image → Scale Image
  • Leave Width and Height locked
  • Set Width to 3000 px (height should be nearly 2000 px)
  • Click Scale

Save the image

  • Menu: File → Export As...
  • Name: passport.jpg

Get the photo printed

Take the photo (online or in person) to your preferred photo printer and get them to print it.

2 comments:

  1. anyone know how to convert this to USA passport photo size... the pixels to inches conversion is not that easy because it has more to do with the relative size of head and face with the white boarder included being 2"x2"

    ReplyDelete
    Replies
    1. A quick look at the US passport photo requirements suggests that the only change you have to make is in "Crop the image to size" to use 2"x2" (instead of 40x50mm).

      You can also skip the "Resize to photo paper size" step if you are using 4"x6" paper as this is an exact multiple of 2"x2".

      Delete