Results 1 to 3 of 3

Thread: [RESOLVED] [2005] Saving image by Handle?

Threaded View

  1. #1

    Thread Starter
    Fanatic Member arsmakman's Avatar
    Join Date
    Dec 2001
    Location
    Leiden, Netherlands.
    Posts
    719

    Resolved [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:
    1. Dim imgInput As Drawing.Image = Drawing.Image.FromFile("C:\InputImage.jpg")
    2. picContainer.BackColor = Color.Black
    3. picContainer.Width = 160
    4. picContainer.Height = 120
    5. picContainer.BackgroundImage = imgInput
    6. picContainer.BackgroundImageLayout = ImageLayout.Zoom
    7. 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!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width