|
-
Apr 7th, 2003, 08:00 PM
#1
Thread Starter
Fanatic Member
Resize Image to a Maximum Size [Resolved]
Hello,
This post could easily go in asp.net or here, in vb.net, so i decided to post here... this is my situation: I have an image, coming from an IO.Stream .... i need to take this image, and resize it...
the stipulations are though, that i only want to resize it if the image is wider than 200 pixels, or taller than 200 pixels... if that is the case, i need to scale the image down to no more than 200 x 200... and of course, i want to keep the image scale, i don't want it stretching....
once i have this new image, i want to paste it centered on a 200x200 white background image... obviously, i am doing this to maintain a common image size across all images to avoid problems with page content appearance...
so, to sum it up, i need to:
1) Scale the input IO.Stream image (JPEG format) down to no more than 200x200 only if it is larger than this to begin with, keeping the picture's scale (no stretching)
2) paste the resized image onto the center of a new white background 200x200 pixel image.
3) Save the new picture file to a specified filepath...
any ideas of how i should go about this? i've been researching ways to achieve this, and there are just sooo many different ways it seems, i'd like to have some input... and possibly code examples... thanks guys~!
Last edited by Redth; Apr 8th, 2003 at 10:12 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|