About Me

My photo
I'm a colonist who has declared war on machines and intend to conquer them some day. You'll often find me deep in the trenches fighting off bugs and ugly defects in code. When I'm not tappity-tapping at my WMD (also, known as keyboard), you'll find me chatting with friends, reading comics or playing a PC game.

Saturday, December 31, 2011

Create a simple vintage photo effect with Gimp

Hey folks!

Sometimes you might want to take a recent photo and make it look like it was taken with a vintage camera. Here's one easy way to do this. Note that the image processing software that I am using here is Gimp 2.6.1. Gimp is free software and can be downloaded from http://www.gimp.org/

Alright, just to give you guys a feel of what we're trying to accomplish, here are before and after shots of a photo that I took when visiting the Chinese Gardens in Singapore.

Before:












After:












Step 1: Open the image of your choice in Gimp.

Step 2: Duplicate the image layer one time. You can duplicate a layer by clicking on the duplicate button at the bottom of the layers panel window or pressing Shift + Ctrl + D (in Windows).

Step 3: With the new layer selected, go to Colors->Desaturate. Pick 'Luminosity' among the options presented and then click OK. Your image should now look Black and White.

Step 4: Change the blend mode of the Black and White Layer to 'Overlay'. The blend mode can be changed from the drop-down menu at the top of the Layers panel.


Step 5: Change the foreground color to the following shade of Yellow: fbf2a3

Step 6: Go to Layer->New Layer (or press Shift + Ctrl + N). Among the Layer Fill type options, select 'Foreground color'. Leave everything else as is and click OK.

Step 7: Change the blend mode of the new layer to 'Multiply' and set its Opacity to 60. Your image should now have a yellowish tinge.

Step 8: Change the foreground color to the following shade of Magenta: e865b3. Once again, add a new layer with Layer Fill type as 'Foreground color'. Change the blend mode of the new layer to 'Screen' and set its Opacity to 20.

Step 9: Change the foreground color to the following shade of Blue: 0949e9. Again, add a new layer with Layer Fill type as 'Foreground color'. Change the blend mode of the new layer to 'Screen' and set its Opacity to 17.

Step 10: That's it! We're done. You may tweak the opacities of the Yellow, Magenta and Blue layers to make your particular image seem more authentic.

Enjoy!

Friday, December 30, 2011

Light Snake for HTML5!


I have had the good fortune to explore a bit of HTML5, an emerging web standard that is poised to take the online world by storm. The technology isn't quite there yet. Current browser vendors offer differing or incomplete implementations of the standard and it's a bit of a pain to ensure that whatever you write works generically. Still, this is one of those lemons that bears watching...

The first thing that crossed my mind was to port LightSnake. Its a simple and fun game of snake and requires very minimal player input. And so, I did manage to port the game from C++ to Javascript and get it running acceptably well on most of the major browsers. One notable exception is that dinosaur of all browsers, the one that exists simply to torment all web-developers. Yes, Internet Explorer!

The project has been hosted on Google App Engine and can be accessed from the following URL: lightsnakegame.appspot.com (I wanted to get the app name 'lightsnake', but someone seems to be squatting on it).

Enjoy!
EDIT: The source of the project can be forked on github at: http://github.com/angelorohit/lightsnake