Today i unleashed the mighty dragonpower of the beast that is called ‘free and open source software’ upon a hand-drawn image that my girlfriend made. The result: a nice SVG (Scalable Vector Graphic) or pdf. The quest wasn’t even that long. Here’s how i got there:

What you need:

  • ImageMagick (the ‘convert’ command on your cli)
  • Potrace

How to do it:

  1. Scan the image to a png, jpg or bmp file
  2. Drag the image through ImageMagick to get it in bitmap format:
    convert image.jpg image.bmp
    you don’t have to do this if your image is already a .bmp file.
  3. Let potrace do it’s magic and create a vector image out of it:
    potrace -b svg -r 300 -t 5 -o 0.4 b.bmp
    Or a pdf file:
    botrace -b pdf -r 300 -t 5 -o 0.4 b.bmp

When that’s done you can use Inkscape to edit the vector image, and Gimp to add some other awesomeness to it.


Let your Mac read for you

February 26, 2010

In Mac OSX, there’s a very nice built-in speech synthesis program. Some people know it from a skype function that says whitch of your contacts comes online. You can also make your computer read the time out loud for you, at certain intervals.
Anyway. The coolest thing is to make your computer say things you want to hear.

Open a terminal, and type this:
say "please hit that return key once more"

now that’s cool. but more interesting is that you can save that sound to an aiff (apple lossless audio) file.
say -o Desktop/myspeech.aiff "please hit that return key once more"

or you can make it read a txt document for you, and again save the output to an aiff file…
say -o Desktop/myspeech.aiff -f Desktop/myspeech.txt

click here for an audio sample!

have fun!


February 26, 2010

A few days ago i created a nice ASCII art php script. I was taking a break from work and i was looking around on the internet for nice ascii art. I saw a wegpage where someone let a script create stars of a certain magnitude. I made a command line script that does the same thing for fun.

for input 1, it gives you this:


for input 2, it gives you this:

etc… it’s quite fun 🙂

you find the script here

to run it, remove the .txt from the end of the filename, open a terminal, and then type this:

php Desktop/stars.php 3

ofcourse, change ‘Desktop’ to the dir where you put it. instead of the 3 type any number below 10

you will need php-cli installed to run this. (installed on Mac OSX by default)