• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 226
  • Last Modified:

Graphics.DrawImage Assistance

How can I use Graphics.DrawImage so that the image I draw appears at it's original size ?

(Like AutoSize on a picturebox)
0
OhNowISee
Asked:
OhNowISee
1 Solution
 
Wayne Taylor (webtubbs)Commented:
Use something like this....

        Dim img As Image = Image.FromFile("C:\Path\Image.jpg")
        Graphics.DrawImage(image:=img, x:=0, y:=0, width:=img.Width, height:=img.Height)

The image need not be loaded from a file, but must be an Image or BitMap object.

Wayne
0
 
OhNowISeeAuthor Commented:
How incredibly obvious...
How incredibly stupid of me !!
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now