Sunday, May 30, 2010

Polaroid frame effect using GIMP [Update]

15 Jamadil Akhir 1431H

Official Polaroid dimensions
SX70 Polaroid
Frame dimension: 3 1/2" x 4 1/2"
Photo dimension: 3 1/8" x 3 1/8"

Spectra Polaroid
Frame dimension: 4" x 4 1/8"
Photo dimension: 3 5/8" x 2 7/8"



Pic 1 - My first GIMP Polaroid result. Also, the result from my twisted Polaroid measurements. Pic 2 is affected as well.

Pic 2 - Wau bulan. Did i already mention about my twisted polaroid measurements? :D

The Old Malay text is written using the Arabic script as seen on the bottom right-hand side corner. The Old Malay script is referred to as Jawi.

The New Malay text is written using the Roman script, shown in the lower left-hand side corner. The New Malay script is referred to as Rumi.

Blogger isn't doing me any justice with PNG's. Blogger strips away the transparency and replaces it with an ugly white background :(.
To read a discussion about transparency and PNG's, see here: .png alpha-channel (transparency) stripped. To see the real Pic 2, go here: Does LiveJournal support PNG?.

Pic 3 - Result using the Spectra Polaroid dimensions.

Pic 4 - Result using the SX70 Polaroid dimensions.


If this guide (tutorial sounds formal) looks long and tedious, you've been deceived. The steps are pretty simple and details are provided as much as possible. Give the guide a try. If this notice doesn't change your mind, go to the end of this post -- in the Goodies section -- to download files and straightaway get to editing.

Update 2011-8-7: Files in the Goodies section have been removed by RapidShare since i'm a free user and the files have been inactive over 30 days. So let me know if you want the files, *insya-Allah* i'll email them. For 3 *.zip files, the total file size is 19MB.

I learned some Polaroid-making basics here: Turn a digital photo into Polaroid with GIMP. After getting the idea, went on and did some experimenting using GIMP 2.6.8 to produce Pic 1.

How to create your own Polaroid template

Throughout the guide, dimensions are based on the Spectra Polaroid. Where i think important, note on the SX70 format is included.

1. Run GIMP Image Editor. In the upper panel, click Applications > Graphics > GIMP Image Editor. Refer Pic 5.

Pic 5 - Refer Step 1. Run GIMP. I accidentally left the cursor out of the screenshot ;p.

2. Once GIMP has loaded and is up and running, we start creating from scratch. Click File > New..., as shown in Pic 6.

Pic 6 - Refer Step 2. Creating a new GIMP file.

3. In the Create a New Image pop-up window, input the measurements in inches as follow:
  • Width: 4.000
  • Height: 4.125
Expand the Advanced Options section. Set the resolution dimension to pixels/in. Then see that the chain icon is linked (instead of broken). If the chain is broken, simply click to connect. Change the X resolution to 107. The Y resolution will change proportionally to X resolution (that's because the chain is linked). See Pic 7. Finally, click the OK button.

Pic 7 - Refer Step 3. Image dimensions for the Spectra Polaroid.

Pic 8 - Image dimensions for the SX70 Polaroid.

4. Save the work. Click File > Save As..., as shown in Pic 9. It's good to save early and often to avoid losing data if something like power outage happens.

Pic 9 - Refer Step 4. Saving the image for the first time.

5. In the Save Image pop-up window:
  • Name: give your file a name. I named the file "Spectra Polaroid frame".
  • Places: select a location to place the file. For the time being, i put it on the Desktop.
  • File Type: select the format GIMP XCF Image.
This is the native format for GIMP. The extension in the file name will be *.xcf. Refer to Pic 10. Then click the Save button. For the SX70 Polaroid, save the file as "SX70 Polaroid frame".

Pic 10 - Refer Step 5. Naming the file and setting the format.

Example of native format of other graphic editors
See here for comparison, Comparison of raster graphics editors.

6. By default, the current layer is named Background. We'll let the name be as it is, then change it later on. Click Layer > Transparency > Add Alpha Channel. See Pic 11.

Pic 11 - Refer Step 6. Adding alpha channel to the current layer.

7. To start making the Polaroid frame, click Layer > New Layer....

Pic 12 - Refer Step 7. Adding a new layer to make the Polaroid frame.

8. In the New Layer pop-up window:
  • Layer Name: Polaroid frame
  • Layer Fill Type: Transparency
Leave the Width and Height as it is. Refer Pic 13. Then click the OK button.

Pic 13 - Refer Step 8. Naming the new layer.

9. Hide the Background layer by clicking the eye symbol (shown in Pic 14) in the Layers tab.

Pic 14 - Refer Step 9. Background layer hidden.

10. Now to give color to the Polaroid frame. For this step, make sure the Polaroid frame layer is active (selected); check the Layers tab.

In the Toolbox tab, click the Blend Tool icon, like in Pic 10.

Pic 15 - Refer Step 10. Blend Tool icon.

11. Still in the Toolbox tab, further below the Blend Tool icon is the Foreground & Background colors icon, like in Pic 16. Click the Foreground square (in this case, the black square).

Pic 16 - Refer Step 11. Foreground & Background colors icon on the Toolbox tab. Black square: the Foreground square. White square: the Background square.

A Change Foreground Color pop-up window, like in Pic 12 will appear. I prefer a white frame, however, in sync with Nicu's Polaroid tutorial, we give it a light-grayish hue. Also, if you want a different color for the Polaroid frame, it is at this step here where to do it.
  • HTML notation: e3e1e1 (see Pic 17)

Pic 17 - Refer Step 11. Picking a color for the Polaroid frame.

Then click the OK button. The Toolbox tab will look something like in Pic 18.

Pic 18 - Refer Step 11. Before applying the blend color to the Polaroid frame.

12. Click+hold the mouse from the bottom right corner, then drag across the canvas to the upper left corner, as shown in Pic 19. Then release the mouse button. Pic 20 shows the blend result. The reason to apply this way is for the blend to compliment the Drop Shadow (coming up in Step 17).

Pic 19 - Ok. Refer Step 12. Applying the blend direction.

Pic 20 - Refer Step 12. After applying the blend.

13. Now to cut-out a hole in the Polaroid frame layer for the photo. In the Toolbox tab, click the Rectangle Select Tool icon, as shown in Pic 21.

Pic 21 - Refer Step 13. Rectangle Select Tool in the Toolbox tab.

Create a temporary rectangle on the Polaroid frame layer, then alter it to the following dimensions in inches (in):
  • Position: 0.187 x 0.187
  • Size: 3.625 x 2.875
Press the Enter button upon each input. Step 13 is summed up in Pic 22.

Pic 22 - Refer Step 13. Dimensions of the photo frame for the Spectra Polaroid.

Pic 23 - Dimensions of the photo frame for the SX70 Polaroid.

14. Remove the selected area by clicking Edit > Clear, as done in Pic 24. Deselect by clicking anywhere outside the selected area. The canvas will look something like in Pic 25.

Pic 24 - Refer Step 14. Deleting the selected area from the Polaroid frame layer to make way for the photo.

Pic 25 - Refer Step 14. After removing the selected area from the Polaroid frame.

15. Now, to enlarge the canvas to make room for the Drop Shadow around the perimeter of the Polaroid frame. Click Image > Canvas Size.... See Pic 26.

Pic 26 - Refer Step 15. Enlarging the canvas to make room for the Drop Shadow.

16. In the Set Image Canvas Size pop-up window, set the measurement to inches, and see that the chain is linked. Set the Height to 5; the Width will change proportionally.

Click the Center button to center the previous canvas on the new canvas. Then click the Resize button. Refer to Pic 27 which captures this whole step. Dimensions for the SX70 Polaroid is shown in Pic 28.

Pic 27 - Refer Step 16. Dimensions for enlarging the canvas of the Spectra Polaroid.

Pic 28 - Refer Step 16. Dimensions for enlarging the canvas of the SX70 Polaroid.

Pic 29 - Refer Step 16. After changing canvas size of the Spectra Polaroid.

17. Now to add the earlier mentioned Drop Shadow to the Polaroid frame; to give the frame some sort of levitating look. Click Filters > Light and Shadow > Drop Shadow.... Refer Pic 30.

Pic 30 - Refer Step 17. Adding the Drop Shadow to the Polaroid frame.

In the Script-Fu: Drop Shadow pop-up window like in Pic 31, set the shadow properties as follows:
  • Offset X: 8
  • Offset Y: 8
  • Blur radius: 15
  • Color: Black (HTML notation: 000000)
  • Opacity: 80
  • Allow resizing: leave tick box empty. i actually don't know what it does :D
Update 2010-11-25: if you check the resizing box, it will actually do what you're doing in step 15 and 16 for you. It enlarges the canvas size just large enough to contain your desired shadow. ~Katie

Update 2011-8-7: Reinstated Step 15 and 16 after note from Shallot. Click following links to see screenshot of result:

Pic 31 - Refer Step 17. Setting the Drop Shadow properties before applying.

Then click the OK button. Notice changes in the Layers tab. There's a new layer below the Polaroid frame layer named Drop Shadow.

Pic 32 - Refer Step 17. The generated Drop Shadow layer in the Layers tab.

18. Now to create the lightened area you see on the outer-side of the Polaroid frame in Pic 3 and 4. Create a new layer; see how in Step 7 and 8. Name this new layer Outside frame, like in Pic 33.

Pic 33 - Refer Step 18. New layer to place the lightened area on the outer perimeter of the Polaroid frame.

In the Layers tab, arrange the Outside frame layer to be below the Drop Shadow layer.

Pic 34 - Refer Step 18. Arrangement of the Outside frame layer in the Layers tab.

19. This step is to give color to the Outside frame layer. Make sure the Outside frame layer is selected in the Layers tab, otherwise another layer will be colored.

Select the Bucket Fill Tool icon. For contrast, change the Foreground square (refer to Pic 11) color to white (HTML notation: ffffff), as shown in Pic 35. Then click the canvas to fill the Outside frame layer with the selected color. Pic 28 shows the result.

Pic 35 - Refer Step 19. Before applying the Bucket Fill Tool.

Pic 36 - Refer Step 19. After applying the Bucket Fill Tool.

20. Now to clear-out the photo area, again, this time on the Outer border layer. Select to activate the Polaroid frame layer in the Layers tab. Select the Fuzzy Select Tool (see Pic 29) on the Toolbox tab. Then click inside the inner rectangle that represents the photo area.

Pic 29 - Refer Step 20. Fuzzy Select Tool in the Toolbox tab.

Once the picture area is selected, click the Outside frame layer to go to it. Click Edit > Clear. The result is shown in Pic 37.

Pic 37 - Refer Step 30. After removing the photo area in the Outside frame layer.

21. On the Layers tab, drop the Opacity of the Outside frame layer to 30. See Pic 38. The result is shown in Pic 39.

Pic 38 - Refer Step 31. Opacity of Outside frame layer dropped to 30.

Pic 39 - Refer Step 31. The canvas after lowering the opacity of the Outside frame layer.

22. Now to prepare a place for captions on the frame. Click the Polaroid frame layer in the Layers tab to activate that layer. Click the Text Tool icon (Pic 40) on the Toolbox tab. Then click on the canvas to initiate text field. Type in your text. Adjust text field to fit in the lower part of the Polaroid frame. Adjust font type, font size, and text field to suite.

Pic 40 - Refer Step 22. Text Tool icon on the Toolbox tab.

i prepared two rows for text with properties as such:
  • Font: Century Schoolbook L Italic
  • Size: 35 px
  • Put a tick in the Hinting and Antialiasing box
  • Color: blue, HTML notation: 044094 (see Pic 43)
  • Justify: Centered
  • Adjust line spacing: -10.0

The Place caption here fjkl (see Pic 41) is as such to predict where the heads of f j, k and l, and tails of f and j will fall.

Pic 41 -  Refer Step 22. Caption placement on the Spectra Polaroid.

Pic 42 - Refer Step 22. Caption placement on the SX70 Polaroid.

Pic 43 - Refer Step 22. Picking the font color.

23. In the Layers tab, rename the Background layer to Place pic here layer, so that some other time if you forget, you know where to place the picture. Make the eye symbol of this layer visible. See Pic 44. Somehow, i prefer to keep the Outside frame layer invisible, and the Place pic here layer empty. Result is show in Pic 45 for the Spectra Polaroid, and Pic 46 for the SX70 Polaroid.

Pic 44 - Refer Step 23. Renaming the Background layer to Place pic here.

Pic 45 - Refer Step 23. Result for the Spectra Polaroid.

Pic 46 - Refer Step 23. Result for the SX70 Polaroid.

Polaroid template, done!

How to use the Spectra/SX70 Polaroid frame

1. Open the Spectra Polaroid frame.xcf or SX70 Polaroid frame.xcf file.

2. Drag and drop a photo into the canvas area. Rearrange layer in the Layers tab if required.

3. Adjust photo size, placement, color, etc. Crop if necessary.

4. Type in caption. Modify text size, color, etc if necessary.

5. If somehow you want the area outside of the Polaroid frame to be clear of any pictures and graphic effects:
  • crop or resize your photo to be smaller than the Polaroid frame
  • hide the Outside frame layer (eye symbol in Layers tab)

6. Save your work in the PNG image format (*.png). As for Pic 47 and 48; I don't know much about formats, so usually i just accept the default settings. Note that Blogger does not fully support PNG'; see Pic 2.

Pic 47 - Refer Step 6.

Pic 48 - Refer Step 6.

Polaroid editing, done!


Here are files to choose from for download. (18.6 MB) contains:
  • "Raw frames" folder
    • contains two files ready for use
      • Spectra Polaroid frame.xcf
      • SX70 Polaroid frame.xcf
  • "Sample" folder
    • contains two folders
      • Edited frames
      • Finished frames
  • "Edited frames" folder
    • contains two files
      • [Spectra] Corak wau bulan (with Outside frame).xcf
      • [SX70] Corak wau bulan (with Outside frame).xcf
  • "Finished frames" folder
    • contains two files
      • [Spectra] Corak wau bulan (with Outside frame).png
      • [SX70] Corak wau bulan (with Outside frame).png
  • ReadMe (138.3 KB) contains:
  • ReadMe
  • Spectra Polaroid frame.xcf (130.8 KB) contains:
  • ReadMe
  • SX70 Polaroid frame.xcf

Have fun experimenting! :D
And spread the fun! :D

Wednesday, May 26, 2010

Audacity sound recording: from real Mono to fake Stereo

12 Jamadil Akhir 1431H

I have a minor recording problem. And I think I've amateurly fixed it! :D

My laptop's internal microphone records in real stereo. But the plugged-in external mic records in fake stereo. I don't really know the politically-correct term, so i'm just making things up :D.
  • Real stereo: Left & right channel records simultaneously.
  • Fake stereo: Only one channel records.
To elaborate further on the fake stereo part; the recording using an external mic shows both the left and right channel. However, sound is only recorded on the left channel, see Pic 1. Thus during playback, you can hear sound coming only from the left headphone; nothing from the right.

Pic 1 - Fake stereo.

Lucky there's a function in Audacity that solves this problem. The function changes the track from Stereo (my fake stereo as shown in Pic 1) to Mono.

1. Make a fake stereo recording. It will sound something like Sound 1.

Sound 1 - Fake stereo recording.

2. On the toolbar, click Tracks > Stereo Track to Mono, as shown in Pic 2. Pic 3 shows the track changed by Audacity's said function.

The sound file shown in Pic 1 and Pic 3 are in Zip 1 file. Feel free to try it out.

Pic 2 - Refer Step 2. Audacity's function to change a track from stereo to mono.

Pic 3 - Refer Step 2. Real mono.

Can't seem to upload Sound 2 file. The Sound 2 (fake mono) track is available in Zip 1.
Sound 2 - Fake mono track -- converted from the fake stereo track.

Testing Mono Stereo
Testing Mono Stere...
Hosted by eSnips
Zip 1 -

This solution works for me! :D