Bitmap newBitmap = new Bitmap(originalBitmap);
using (Graphics myGraphics = Graphics.FromImage(newBitmap))
{
// draw here on myGraphics
}
// newBitmap - modified image
或者使用 Load &节省:
Bitmap myBitmap = new Bitmap("fileName.bmp");
using (Graphics myGraphics = Graphics.FromImage(myBitmap))
{
// draw here on myGraphics
}
myBitmap.Save("newFileName.bmp");
Bitmap newBitmap = new Bitmap(originalBitmap);
using (Graphics myGraphics = Graphics.FromImage(newBitmap))
{
// draw here on myGraphics
}
// newBitmap - modified image
Alternatively with Load & Save:
Bitmap myBitmap = new Bitmap("fileName.bmp");
using (Graphics myGraphics = Graphics.FromImage(myBitmap))
{
// draw here on myGraphics
}
myBitmap.Save("newFileName.bmp");
发布评论
评论(2)
或者使用 Load &节省:
Alternatively with Load & Save: