there might be something in the GD library to help with this, http://php.net/manual/en/book.image.php. I'd imagine you'd need something in the picture that would help you determine a base so you can figure out size. Good luck and if you actually figure this out, please post a tutorial so we all can learn from your project.