|
-
January 27th, 2003, 05:27 PM
#4
To resize a picture you don't need a picturebox.
Try the follow code example:
Dim Scale As Double
Dim NewWidth As Integer
Dim p1 As New System.Drawing.Bitmap("picture.jpg")
Scale = p1.Height / p1.Width
NewWidth = 200
Dim p2 As New System.Drawing.Bitmap(p1, NewWidth, CType(NewWidth * Scale, Integer))
p2.Save("new picture.jpg")
p1.Dispose()
p2.Dispose()
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
|