摘要:
记忆是有限的,你们应该知道我想说什么了。//核心代码Bitmap bitmap;private void buttonOpen_Click(object sender, EventArgs e) { OpenFileDialog openFileDialog = new OpenFileDialog(); openFileDialog.Filter = "*.bmp|*.bmp"; openFileDialog.Title = "打开图像文件"; openFileDialog.Multiselect = false; if (openFileDialog 阅读全文
摘要:
核心代码:Graphics graphics = this.CreateGraphics(); Pen myPen=new Pen(Color.Black, 1); int beginX = 50; int beginY = 65; int height = 35; int width = 50; Point pointX1 = new Point(beginX, beginY); Point pointY1 = new Point(beginX + 210, beginY); Point pointX2 = new Point(beginX, beginY - 45); Point poin 阅读全文
摘要:
using System.Drawing;using System.Drawing.Imaging;namespace Ex04_03{ public partial class Form1 : Form { string str; public Form1() { InitializeComponent(); }//选择图片 private void button1_Click(object sender, EventArgs e) { openFileDialog1.Filter = "*.jpg,*.jpeg,*.bmp,*.gif,*.ico,*.png,*.tif,*.wm 阅读全文
摘要:
string str; //在图片中绘制文字 private void button1_Click(object sender, EventArgs e) { try { Image myImage = System.Drawing.Image.FromFile(str); Bitmap map = new Bitmap(myImage); myImage.Dispose(); Graphics graphics = Graphics.FromImage(map); graphics.InterpolationMode = InterpolationMode.HighQualityBilin. 阅读全文