

Show HN: PlaceGuitar - my weekend image placeholder project - poissonpie

http://www.placeguitar.com<p>My weekend project is, as you may have guessed, an image placeholder service that serves up guitars! The inspiration came from a tweet (http://twitter.com/#!/zedshaw/status/88126558686019584 ). I decided to hack it together using Python on Google App Engine. The service is simple - pass in your width and height in the url (e.g. www.placeguitar.com/800/600 to get an 800 by 600 image) and get back a random image of a guitar to your size spec. Pop the url in the src of your img tag to use it on a site. That's all it does. There is a quick and dirty admin only form to upload images.<p>The only real challenge was deciding how to scale images. GAE doesn't let you ignore aspect ratio when you resize images which was my original plan for a quick prototype - obviously this wouldn't be very elegant because images would have been distorted for anything that didn't respect the original image's aspect ratio. I settled on scaling to the best approximation and then cropping to centre.<p>The code is on github (https://github.com/poissonpie/Place-Guitar) if anyone is interested. I only tinker in Python now and then so I don't expect it to be all that elegant.<p>I would love any feedback on any aspect of the project.<p>Thanks for looking.
======
revorad
Very neat idea and nicely done. Small bug -
<http://www.placeguitar.com/800/600> works but
<http://placeguitar.com/800/600> just redirects to the site.

~~~
poissonpie
Thank you! and well spotted.....google app engine + naked domains are a little
annoying to get going - I'll look into it.

