|
-
Aug 12th, 2006, 02:22 PM
#1
Thread Starter
Fanatic Member
[RESOLVED] [2005] Saving image by Handle?
Hello everyone,
I have an image which I need to resize and save in the new size.
I show the image on my form in the 'new' size by displaying it as a PictureBox's BackgroundImage in Zoom-mode. This is resolution I want the picture to be saved in.
Now, is there a way to save the image that way? All my attempts seem to save the image in it's original size.
I now use this code, which really only creates a copy of the image.
VB Code:
Dim imgInput As Drawing.Image = Drawing.Image.FromFile("C:\InputImage.jpg")
picContainer.BackColor = Color.Black
picContainer.Width = 160
picContainer.Height = 120
picContainer.BackgroundImage = imgInput
picContainer.BackgroundImageLayout = ImageLayout.Zoom
picContainer.BackgroundImage.Save("C:\OutputImage.jpg")
Thanks,
arsmakman.
Last edited by arsmakman; Aug 12th, 2006 at 05:47 PM.
No matter how fool-proof your program is, there will always be a better fool.
Was a post helpful to you? Rate it!
-
Aug 12th, 2006, 04:45 PM
#2
Thread Starter
Fanatic Member
Re: [2005] Saving image as it is shown?
I think there must be a way to capture the image by using the PictureBox's handle. There are screen-capture programs available that can take like a
'PrintScreen' from one window or control. This is what I need, I just can't seem to find any way of doing it.
No matter how fool-proof your program is, there will always be a better fool.
Was a post helpful to you? Rate it!
-
Aug 12th, 2006, 05:47 PM
#3
Thread Starter
Fanatic Member
Re: [2005] Saving image as it is shown? / Saving image by Handle?
Yay! I found a solution, right here on the forum: http://www.vbforums.com/showthread.php?t=385497
Silly me.
No matter how fool-proof your program is, there will always be a better fool.
Was a post helpful to you? Rate it!
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
|