Showing posts with label GIMP. Show all posts
Showing posts with label GIMP. Show all posts

Sunday, July 26, 2009

Photo to vector art

After a long time... another tutorial!
Converting a photo into vector art. Using this method you can quickly and easily change a photo into vector art. Following is the final result of this tutorial:



1] Open the image in GIMP. I wanted to have just myself in the final result, so used scissor select tool to crop myself out from the photograph





2] Use Filter | Blur | Gaussian Blur tool 2-3 times to smoothen the image.

3] Now use Colors | Posterize tool to reduce the number of colors. I used 5 colors, you can use less or more. After you apply the changes, the image looks very much like the final result, but its still not a vector image!



4] Next thing we'll do is creating paths from these different colors. Use the 'Select by color' tool to select all regions with black color in the image.



5] If you see closely, at many places there are very thin selections made which we probably don't want in the final image. We need to clear those selections before we proceed. Click on the 'Quick mask' button in the bottom-left of the image window. Use the Filter | Blur | Gaussian blur tool, to blur the quick mask. Blurring would cause very thin transparent regions in the quick mask to be filled.



6] The blurring causes very thin transparent regions to be filled, but they are still not completely filled. Use Colors | threshold tool. Apply a threshold value such that the small regions are now filled.



7] Click again on the quick mask button to get back to normal mode. You should see that most of the thin selections are removed. If there still are some regions that you want to deselect, you can do it manually. Because of the previous step, the size of selection is slightly reduced. Use Select | Grow tool to grow the selection by few pixels so that the selection is slightly bigger than the original black color region.



8] Select | To path tool will create a path using the selection, i.e. a path representing whole black region. Rename the path to '1'.



9] Do the same steps to create paths for all five colors, and rename the paths to 1,2,3,4,5.

10] The paths created are very complex and have a many nymber of nodes. We need to simplify these paths. Open the paths dialog, right click on each of the path and export them as .svg files.

11] Now open one of these .svg files in Inkscape and double click on the path [an object in inkscape] and press ctrl+L, this would simplify the path and reduce the number of nodes. Save the .svg file.



12] Do the same thing for other .svg files.

13] Rename the existing paths in GIMP or delete them and import the modified paths from the .svg files. To import right click in the paths window and click import.



14] Double click on a path, this would show the path and select the paths tool in the toolbox. Click the select from path button to get a selection, create a new layer and fill the selection with some color. Similarly create a layer for all paths and fill them with different colors. I used the same 5 colors that the posterize tool used.



[15] Done! You can play around with other things, like I added a gray background and a shadow.

Thursday, April 2, 2009

Put yourself on banner

Couldn't find a good photograph of mine to use (I am not photogenic), so I used Daniel Craig :D. This tutorial shows how to put a photograph on a hoarding. Nothing complex, just a simple thing. It just came across my mind, so I thought to write a tutorial.

GIMP version - 2.6.4
Image size - hoarding (1024x768), Casino royale poster(799x403)

Here are the two images that I started with



..this is what I ended up with



Following is what I did:
1] Open up the hoarding image in GIMP. Now, before doing anything else we need to make sure that the image that we are going to put on the hoarding is in (almost) same aspect ratio as the hoarding. To get the aspect ratio of the hoarding use the 'Measure Tool' to get the height and width of the hoarding, as shown below:


For the images I used the aspect ratio came out 2:1 which almost same as the image, so I didn't have to crop the image. If the ratio is different, make sure you crop the image before putting it on the hoarding.

2] Open the second image as layer. I'll call this layer as "poster layer". To put the image on the hoarding, use the 'Perspective Tool'. Reduce the poster layer opacity and in the perspective options select 'Preview' as 'Outline', this is not necessary to do, but it will help.


3] This is what I got after applying the perspective transformation.


4] Now, we need to do some clean-up stuff. As you can see the corners of the hoarding are round, there are few cables infront of the hoarding, a light at the bottom. Add a layer mask to the poster layer. Reduce the layer opacity so that we can see the hoarding border through it. Select the layer mask and paint black color over the area that we don't want to be visible. You can zoom in to do it neatly


5] This is what I got after rounding the corners:

6] Now, the cables: hide the poster layer, select path tool to create a path over the cables. Select the layer mask and "stroke path" with black color. I guess most of the cables in front of any such hoarding should be easy to handle.

Similarly, do the same thing for other cables. This is what I got:


7] Almost done, just the final touch. The colors in the poster look too bright compared to the surroundings. Reduce the brightness and contrast a little for the poster layer.

8] And then, here is the final result

Monday, February 16, 2009

Image to polaroid collage

Hmmm.. it seems I've been busy for some time (not really ;-)). Anyway here comes another GIMP tutorial that I wanted to write from some time, but couldn't. Better late than never :-)

Following tutorial is to get a polaroid collage effect on an image. What I am going to do is just place some randomly rotated polaroid frames that we will create in step [3]. To give it a little realistic look we will use shadows and Curve Bend tool.

GIMP version: 2.6.4
Image size: 1024 x 768

Before we start just preview of what I finally got:

1] Create a new image in GIMP of size same as original image (i.e. 1024 x 768 here). The idea is to create all the frames and finally put the original image in the background.

2] Hide the background layer and create a new transparent layer which is 300px wide and 400px high, and name it "frame".

3] Now add little off-white borders to the layer. I used (240, 240, 240) color. Make the borders 10px wide on left, top and right side and 30 px wide on the bottom side. You can use the rectangle select and the bucket fill tools. After drawing the borders you must have something like this:

4] Now create a transparent layer, and name it as "collage". We will use buffer to temporarily put a frame, then rotate and distort it a little, and then put on the "collage" layer.

5] Lets start with the first frame. Select layer "frame" hit Ctrl+A to select the frame that we made. Select layer "buffer" and hit Ctrl+V to paste, but don't merge down the floating layer yet. Select Filters | Distorts | Curve Bend, and slightly bend the upper curve, press copy button to copy the same curve to the lower region. Press ok to apply the transformation. You should get something like this:

6] Now, take the rotate tool and rotate the floating layer with some random amount.

7] Select Filters | Light and Shadow | Drop Shadow, and drop a shadow. I used the x-y offset as 5 and blur radius as 8, opacity as 80.

8] Now merge down the floating layer on the layer "buffer". Rearrange the layers as "buffer", "Drop Shadow" and "collage". Merge down the "shadow" layer to the "collage" layer. Select the layer "buffer", take the "fuzzy select" tool and click inside the blank area in the frame. Now merge down the "buffer" layer to the "collage" layer. Now press delete to delete the selected area. This is what I got after this step:

9] As you would have noticed that the "buffer" layer is lost. Create another "buffer" layer. and repeat the steps 5-6-7-8 several times, with frames rotated with different angles, distorted with different amount, and pasted at different places.

10] After repeating steps 5-6-7-8 several times, I got this:

11] Now, just place the original image in the background. To get better results you may place the original image in the background before and then put the frames according to the image.

Tuesday, January 20, 2009

Cool Water Text Effect

Another GIMP Tutorial :D

Following tutorial is to create a water text effect.

A quick google search got me the following image of a wood surface on which we will add our water text effect.



This is what I got finally




image size: 1024x678
GIMP version - 2.6.2

Following are the steps that I followed

1] Open image in GIMP.

2] Add a new text layer and add text in white color with some hand-writing font so that it looks more realistic.

3] Take a white brush and paint some spots that we'll turn into water drops like the following image:



4] Set layer size to image size.

5] Duplicate the layer with text (Lets call them t1 and t2).

6] Right click on layer 't2' in layers dialog and select 'Alpha to Selection'. This would select the non transparent region.

7] Switch to channel window and add a new channel. Set channel opacity to 100, and tick 'Initialize from Selection' option. Now deselect all and blur the channel three times with blur raius as 7, 4, 1. Then hide the channel.



8] Now we will add some lighting effect to the layer 't2' using the channel we created as bumpmap. You can use following settings:



After applying the changes you must have something like this:



9] Select layer 't2', Lock the alpha channel (this option is towards top of the layers dialog), then blur the layer with blur radius as 4px. Unlock the alpha channel.

10] Select Colors | Color to Alpha, and choose a mid gray color. This should give you something like this



11] Now we will add some shadow to give a little more realistic look. Right Click on the 't1' layer and select 'Alpha to Selection'. Drop a shadow offset to x:-2, y:1 and alpha set to 50%.



12] There is too much *white* in the image, select the 't2' layer, Colors | Curves, select channel as Alpha and slightly move the curve downwards till you have something like this:


13] We are almost done, just need to add a slight refraction effect. Select layer 't1' and again make a selection from alpha. Now select the wooden surface layer (keeping the selection). Select Filters | Distort | Whirl and pinch, set angle to 60, radius to 2. Select Filters | Distort | Lens Distortion, Set Main:-25, Zoom:2.

14] Done!! This is what I have finally:

Friday, January 16, 2009

Add colors to your pics : Lomo Effect

While browsing through some photoshop tutorials, I came across 'Lomo Effect'. There seem to be lot of Photoshop tutorials to add lomo effect to your pictures, so I thought to write one for GIMP.

I used GIMP 2.6.2
image resolution 1024x768

Original image



Final image


1] Open your image in GIMP.

2] Select whole photo using 'Select | All'

3] Shrink the selection by 75 pixels (Select | Shrink)

4] Feather the selection by 300 pixels (Select | Feather)

5] Invert the selection (Select | Invert)

6] Create a new transparent layer and select it

7] Take the gradient tool, set shape to 'Radial', and add a white to black gradient from center of phot to the bottom side. You must get something like this:



8] Set the gradient layer mode to overlay.

9] If the border looks too dark, reduce the opacity of the gradient layer or ifs less dark then duplicat the gradient layer (make sure the duplicate layer is also set to overlay mode). I got the following result after duplicating the layer.



10] Flatten the image (Image | Flatten Image)

11] Open the Color curves dialog (Colors | Curves), set channel to values and apply an 'S' curve, something like this:


12] Apply the changes.

Done!!