من می خوام از کد زیر استفاده کنم :
Dim bm As New Bitmap(PictureBox1.Image)
Dim thumb As New Bitmap(350, 400)
Dim g As Graphics = Graphics.FromImage(thumb)
g.InterpolationMode = Drawing2D.InterpolationMode.HighQualityBicubic
g.DrawImage(bm, New Rectangle(0, 0, 350, 400), New Rectangle(0, 0, bm.Width, bm.Height), GraphicsUnit.Pixel)
g.Dispose()
thumb.Save(Application.StartupPath + "//PicProgram.jpg", System.Drawing.Imaging.ImageFormat.Jpeg)
bm.Dispose()
thumb.Dispose()
MsgBox("sucssefull resize pic", MsgBoxStyle.DefaultButton1, "")
اما قبل از ذخیره در مسیر زیر در بانک ذخیره بشه و در اونجا ذخیره نشه :
thumb.Save(Application.StartupPath + "//PicProgram.jpg", System.Drawing.Imaging.ImageFormat.Jpeg)