Torna al Thread

Dim bm As Bitmap = CType(Image.FromFile("myimage.jpg"),Bitmap) Dim resized As Bitmap = New Bitmap(640, 480) Dim g As Graphics = Graphics.FromImage(resized) g.DrawImage(bm, New Rectangle(0, 0, resized.Width, resized.Height), 0, 0, bm.Width, bm.Height, GraphicsUnit.Pixel) g.Dispose resized.Save("resizedimage.jpg", ImageFormat.Jpeg)
Copyright © dotNetHell.it 2002-2024
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5