Howto: Vectorize images in Inkscape

I know you’re looking at it. I know because I can track links through WordPress, and two hours after I posted that last screenshot, I had double-digit clickthroughs. It is a rather interesting image, don’t you think?

Vector images like that can be more striking than an original photo, depending on the subject and the composition. That one works in particular because of the natural sun flare behind the towers, which makes an interesting gradient through the upper right of the picture.

That was built in Inkscape, and vectorizing an image like that takes only a few minutes, even at 1Ghz. If you’re running a fairly modern machine, you can probably have the entire job done in the time it takes to open a can of Fanta.

Anyway, here’s how you can do the same thing … and trust me, it’s quite simple.

First, I cropped the photo to the size I wanted for the monitor. You’re free to do that too if you like, although you’ll end up with a traced version of the photo, so it can be scaled to any size you like. Presizing does make things a little quicker though.

Here’s another image that looks quite nice when finished — these are the mountains outside Paarl, South Africa. The contrast between the sunset on the rocks and the blue in the sky and the deep greens in the foreground is going to be quite beautiful.

You’re free to download that one and experiment with it, if you like. It’s shot at 1600×1200, just so you know.

The first thing I do — and of course, there are probably plenty of ways to do this, so tell me if you have a better method — is to open Inkscape and plop that image down in the center. From a blank page, click on File > Import bitmap, and select your photo. It should be impaled on the document, in a rather haphazard fashion.

If you presized your image like I did, the next step is easy — fitting the document to the image (or vice-versa really). Open the Document Properties dialogue with File > Document Properties.

See the button marked “Fit page to selection”? Tap it and the job is done. If your button is disabled, try clicking on the image first. If everything goes right, the document (the white square behind your photo) will snap to the size of the picture, which is what we want.

Now let’s convert this thing. Click on Path > Trace Bitmap. You should get a new dialogue that looks like this:

This is where the magic happens. There is an impressive number of options available to you here, and you could fiddle with this all day before finding the absolute-primo settings for your photo. In this case, I’m just going to show you the ones that work for this photo. Feel free to experiment with it, and see if you get something better.

Enable “Colors,” set the Scans to 16 and click on “Remove background.” Everything else you can leave the same.

“Colors” gives us a color image, but grayscale is an option too. Sixteen scans gives us a fuller array of colors, and “Remove background” will dump the photo from the page when the conversion is done. It just saves us the step. I recommend keeping “Stack scans” enabled, because disabling it leaves white gaps in some places. Yuck.

Now click “Update.”

That gives us a preview of the image, before it’s converted. It’s a good idea to try it, just to make sure your vectorized version isn’t going to look like crud.

When it looks like you want, click OK and photo will be transmogrified. Time taken can be anywhere from a dozen seconds for an 800×600 image at 1Ghz, or a minute or two for 1600×1200. Be patient.

Here’s the finished image, still in Inkscape.

From here it’s a simple matter of exporting it as another bitmap. (If your wallpaper manager can handle a vector image — I think Gnome can — then you can just save the file and be done.) Click on File > Export bitmap and you’ll get this dialogue.

Again, you have lots of options there, but I precropped my image and so I just press OK and it’s done. Set your background however you like, using feh or whatever; here’s the completed product.

Take the time to experiment with the photos you like, and see if you can come up with better settings or new ways of doing this. And if you do, let me know. I love little tips like that. :D

Edit, 2009-12-17: A note of thanks to strongman2, who e-mailed this one to share. The original photo is from Wikipedia, here. Cheers!

Edit, 2010-04-09: Another submission, this time from an e-mail that asked not to be named. :( Original is here.

About these ads

18 Responses to “Howto: Vectorize images in Inkscape”


  1. 1 bkanev 2008/04/12 at 5:28 AM

    Ha, I sure was one of these – refreshed a few times this morning. I wish the weekend wasn’t so busy so that I can try your idea.

    Back on refreshing , I do find your Arch Openbox desktops quite interesting. The best so far is the yellowish/ radioactive one, fluxbox but forgot if it was Arch or something else :) … it might be a good idea if you could add and archive somewhere here with those too.

    I am currently trying to free some time to get my brand new company laptop HP with eihter CrunchBang, Arch (but that’s too ambitious on my time for now) – an idea largely inspired by what I ‘ve read here about your experience.

  2. 2 D3BR074 2008/04/12 at 10:05 AM

    Another arch user! yay! Arch is hands-down the best linux distribution…at least for me. It takes a special kind of person to appreciate arch.

    Anyway, I like the vectorized pictures. Maybe I’ll try that on a picture of me and use it as my login picture. that would be cool. Thanks for the idea! I’m bookmarking your site btw.

  3. 3 miggols99 2008/04/14 at 6:04 AM

    I just wanted to say that this tutorial saved me a lot of trouble! See my blog post…

    http://archux.com/blogs/miggols99/converting-svg
    ;)

  4. 4 Stephan Beal 2008/05/21 at 4:08 AM

    Thanks for that. i was finally able to save some old scanned line drawings from extinction.

  5. 5 Jarz Corp 2008/06/10 at 5:44 AM

    Just a big thank U from me.This has given me one of the tools I really missed on linux.

  6. 6 Parry Hotter 2008/10/29 at 6:20 PM

    Thanx a lot,I am an absolute noob!-I’m doing a high school project and I need to do this for a t-shirt design!!!THANKS

  7. 7 Marius Andersen 2009/10/08 at 3:10 AM

    Half the images here don’t show up.

  8. 8 Paolo 2009/12/09 at 11:35 PM

    I can’t see images….can you reload them?

  9. 12 Prisca 2010/05/16 at 2:36 PM

    Thank you! I was so confused about how to use inkscape at first, but your tutorial made it look so easy! And it was easy too! I appreciate your help! :)

  10. 14 Trixie 2011/02/07 at 5:33 AM

    Thanks! Works even on my iBook 600MHz, works very fast!


  1. 1 HowtoMatrix ยป Howto: Vectorize images in Inkscape Trackback on 2008/04/16 at 2:06 AM
  2. 2 One downside to a CLI setup « Motho ke motho ka botho Trackback on 2009/12/17 at 9:50 AM
  3. 3 Female Assassin « Jess C Scott :: Author, Artist, Non-conformist Trackback on 2010/08/04 at 12:39 AM
  4. 4 Repainters/designers - what software do you use to texturize or recolor? - Page 3 - PaperModelers.com Trackback on 2010/09/30 at 5:55 AM

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




Welcome!



Visit the Wiki!

Some recent desktops


May 6, 2011
Musca 0.9.24 on Crux Linux
150Mhz Pentium 96Mb 8Gb CF
 


May 14, 2011
IceWM 1.2.37 and Arch Linux
L2300 core duo 3Gb 320Gb

Some recent games


Apr. 21, 2011
Oolite on Xubuntu 11.04
L2300 core duo 3Gb 320Gb

Enter your email address to subscribe to this blog and receive notifications of new posts.

Join 405 other followers

License

This work is licensed under the GNU Free Documentation License. Please see the About page for details.

Blog Stats

  • 3,959,266 hits

Archives


Follow

Get every new post delivered to your Inbox.

Join 405 other followers

%d bloggers like this: