Anyone can please help me, I want some good script and method for resizing an image at upload time. I have found few that resize to the browser, but I want to do this for Avatars. So someone could upload 500kb big picture, but it reduce the physical size around 150px150px.

Thanks in Advance