掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
VBでクリッピングした画像を保存するには? (ID:92055)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
>その方法はわかりません。orz 簡単だった。 Dim width As Integer = 100 Dim height As Integer = 100 Dim x As Integer = 10 Dim y As Integer = 10 Dim bmp1 As Bitmap = New Bitmap("c:\test.bmp") Dim bmp2 As Bitmap = New Bitmap(width, height) Dim gr As Graphics = Graphics.FromImage(bmp2) gr.DrawImage(bmp1, 0, 0, New Rectangle(x, y, width, height), GraphicsUnit.Pixel) PictureBox1.Image = bmp2 PictureBox1.Image.Save("c:\test2.bmp", System.Drawing.Imaging.ImageFormat.Bmp) bmp1.Dispose() gr.Dispose()
←解決時は質問者本人がここをチェックしてください。
戻る
掲示板システム
Copyright 2020 Takeshi Okamoto All Rights Reserved.