c#图像旋转和翻转
来源:互联网 发布:js 函数 传递字符串 编辑:程序博客网 时间:2024/04/29 09:42
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Text;
- using System.Windows.Forms;
- namespace WindowsApplication2
- {
- public partial class Form17 : Form
- {
- public Form17()
- {
- InitializeComponent();
- }
- private void button1_Click(object sender, EventArgs e)
- {
- using (Bitmap bmp = new Bitmap(@"d:/我的文档/桌面/ico/watermark.bmp"))
- {
- Graphics g = this.CreateGraphics();
- Rectangle rect = new Rectangle(0, 0, 100, 100);
-
- bmp.RotateFlip(RotateFlipType.RotateNoneFlipX);
- g.DrawImage(bmp, rect);
- }
- }
-
- }
- }