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.




Reply With Quote