Hacker News new | past | comments | ask | show | jobs | submit login

I had to do something similar once. I ended up using ImageMagick and ptrace get a nice "silhouette" of my image and use the generated data to draw a path using Raphael.

convert IMAGE.png -channel matte -separate +matte -flip ppm:- | potrace -k 0.95 -u 1 -s




That's interesting, I'll definitely take a look at Raphael. Did you just need the silhouette, or did Raphael let you do the click through thing too?


I was able to do the click through using the invisible path. The project was a kind of weird puzzle, so the click through was a must.

I upped my prototype here: http://dl.dropbox.com/u/491131/puzzle/puzzle.html You can only drag the camel.

Eventually I gave up because I wasn't able to drag the piece correctly if it was rotated.


That's awesome, thanks for showing me that. It would definitely be cool to implement something similar for browsers with SVG support, then fallback to the generated spans for those without.


Raphael is so awesome that it works even on IE, using VML, with the same sane API.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: