I have an application where user will insert his/her image , i don't know the size of it but while storing the image i want to shrink it for particular size with equal proposition how to achive this... Please Help Me....
Try something like this http://imageresizer.codeplex.com/
Or for PHP:
http://www.white-hat-web-design.co.uk/blog/resizing-images-with-php/
This can be done via GD-library (http://www.php.net/manual/en/book.image.php) or ImageMagick (http://php.net/manual/en/book.imagick.php). The latter is faster but must be installed on the system. GD library offers less speed and less options but is available in most php installations already.
To keep the ratio you simply get the length and width and multiply them with a common factor. The factor is usually calculated using whatever is bigger (length or width).