Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
'.NTEで画像を縮小する
Dim src As Bitmap = New Bitmap("C:\Documents and Settings\デスクトップ\新しいフォルダ\11z.jpeg")
Dim x As Integer
Dim w As Integer = src.Width / 20
Dim h As Integer = src.Height / 20
'Dim dest As Bitmap = New Bitmap(500, 500)
'台紙の上に書けば色は何でも変えられるようだ
Dim dest As Bitmap = New Bitmap("C:\Documents and Settings\kouji\デスクトップ\新しいフォルダ\DaiSi.jpg")
Dim g As Graphics
g = Graphics.FromImage(dest)
g.InterpolationMode = Drawing.Drawing2D.InterpolationMode.HighQualityBicubic
g.DrawImage(src, 50, 50, w, h)
dest.Save("C:\Documents and Settings\デスクトップ\新しいフォルダ\test.jpeg", Imaging.ImageFormat.Jpeg)
End Sub
|