|
-
Jan 21st, 2004, 11:30 PM
#1
Thread Starter
Lively Member
Resizing an Image
I'd like to load an image (bmp or jpg) of unspecified size, resize it, and save it to a memory stream for display. I thought I could load it into a picture box and resize it that way but:
a) there has to be a cleaner more direct way to do this (i.e. shouldn't I be able to do this w/o loading it into a pictureBox?)
b) it looks like pictureBox holds an orginal copy of the image and gives you back that (via pictureBox.Image.Save), so this technique doesn't really seem to work anyway.
Ideas?
-
Jan 22nd, 2004, 06:19 AM
#2
Load it into an Image. Create another Image with your desired target size. Stretch Blit the source image to the target image. Save the target Image.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Jan 22nd, 2004, 07:21 AM
#3
Hyperactive Member
.getthumbnail method is useful
-
Jan 22nd, 2004, 09:29 AM
#4
Thread Starter
Lively Member
Thanks guys, those are some good ideas...
-
Jan 27th, 2004, 08:13 AM
#5
yay gay
.getthumbnail does an awful job as it will blur the whole image
\m/  \m/
-
Jan 28th, 2004, 04:49 AM
#6
Hyperactive Member
i've used getthumbnail and it hasn't blurred the images, any more than reducing the size in photoshop etc.
-
Jan 28th, 2004, 12:26 PM
#7
yay gay
Maybe you had small images and didn't notice..but I assure you if you try with 1024x800 pictures it will blur them up
\m/  \m/
-
Jan 28th, 2004, 11:23 PM
#8
Fanatic Member
http://www.vbforums.com/showthread.p...ghlight=resize
I ran into this problem a long time ago... but there is a good way to resize and even compress into jpg images properly... check out that link... and good luck
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
|