I am using Graphics object to resize and crop an image and then finally save it to the disk.
I am either able to resize or crop but not both.
May be I am not passing the parameters to the graphics object correctly.
Just to add that my original image is of size 50 * 50.
I would first need to increase the size to 100 * 100 and then crop it to fit in 75 * 75 size.
(the requirement is not to scale it to 75 * 75 directly.
but to first resize to 100 * 100 and then crop it to 75 * 75 and then saving it.)
I think I am not using the Graphic object and Image object in the right way , passing it dimensions in wrong locations and hence it is either cropping or resizing but not doing both. Please help.
Member
11 Points
27 Posts
Thumbnail resizing and cropping
Mar 26, 2011 06:39 PM|oneuser|LINK
Hi ,
I am using Graphics object to resize and crop an image and then finally save it to the disk.
I am either able to resize or crop but not both.
May be I am not passing the parameters to the graphics object correctly.
Just to add that my original image is of size 50 * 50.
I would first need to increase the size to 100 * 100 and then crop it to fit in 75 * 75 size.
(the requirement is not to scale it to 75 * 75 directly.
but to first resize to 100 * 100 and then crop it to 75 * 75 and then saving it.)
I think I am not using the Graphic object and Image object in the right way , passing it dimensions in wrong locations and hence it is either cropping or resizing but not doing both. Please help.
All-Star
35159 Points
9075 Posts
Re: Thumbnail resizing and cropping
Mar 27, 2011 03:48 PM|smirnov|LINK
http://forums.asp.net/t/1656730.aspx
Member
70 Points
34 Posts
Re: Thumbnail resizing and cropping
Mar 27, 2011 05:28 PM|nathanael.jones@gmail.com|LINK
This might help: http://nathanaeljones.com/163/20-image-resizing-pitfalls/
Also, take a look at imageresizingin.net
Member
11 Points
27 Posts
Re: Thumbnail resizing and cropping
Mar 27, 2011 07:38 PM|oneuser|LINK
thanks for you help.
It works really cool.