C#控制图像旋转和翻转的方法
作者:zhuzhao 发布时间:2023-11-26 08:25:08
标签:C#,图像
本文实例讲述了C#控制图像旋转和翻转的方法。分享给大家供大家参考。具体实现方法如下:
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.Rotate90FlipNone);
bmp.RotateFlip(RotateFlipType.RotateNoneFlipX);
g.DrawImage(bmp, rect);
}
}
}
}
希望本文所述对大家的C#程序设计有所帮助。
0
投稿
猜你喜欢
- 系列目录 【已更新最新开发文章,点击查看详细】类似于以下场景,将表单中的用户信息(包含附件)上传到服务器并保存到数据库中,<form
- 不啰嗦,上菜 QueryWrapper queryWrapper = new QueryWrapper(); queryWrapper.se
- 项目中要使用到在线支付功能 目前常用的在线支付手段主要是 支付宝 和微信。 这里我使用的是支付宝支付,支付宝有个好处就是他有一个沙箱模式 即
- /// <summary>/// 生成二维码/// </summary>/// <param name=&qu
- 一、前言CountDownLatch维护了一个计数器(还是是state字段),调用countDown方法会将计数器减1,调用await方法会
- 概述从今天开始, 小白我将带大家开启 Java 数据结构 & 算法的新篇章.贪心算法贪心算法 (Greedy Algorithm)
- 大家在进行Android项目开发的时候经常会遇到中文输入和英文输入切换的情况,本篇内容教给大家实现Android下自动识别中英文键盘的功能。
- 1.组装查询条件组装查询其实很简单,可以支持条件的链式编程:查询用户名包含a,年龄在 10 - 20 之间并且邮箱不为空的用户:@Testv
- 在Spring 5 Webflux中,配置CORS,可以通过自定义WebFilter实现:注:此种写法需真实跨域访问,监控header中才会
- 1、SpringMVC中默认集成SpringMVC已经默认集成了JackSon,如下所示: @RequestMapping(&q
- 先看看效果图:实现思路:擦除图片相应的角,然后层叠图片,产生倾斜效果代码实现:1、定义属性在values文件夹下的attrs文件添加以下代码
- 背景在做社交类平台开发的小伙伴都躲不开选择社交个性标签的业务需求,那么实现这个UI效果我想大伙第一时间想到的必定是RecycleView或G
- Dataway介绍Dataway 是基于 DataQL 服务聚合能力,为应用提供的一个接口配置工具。使得使用者无需开发任何代码就配置一个满足
- 本文实例为大家分享了Unity3D实现批量下载图片功能的具体代码,供大家参考,具体内容如下下一篇文章试试用线程下载代码如下using Sys
- 项目介绍java 开发中,参数校验是非常常见的需求。但是 hibernate-validator 在使用过程中,依然会存在一些问题。vali
- 在Activity类的子类中直接复写下面三个方法://复写onCreateOptionsMenu()方法,弹出菜单栏
- 在项目开发中,经常会碰到日期处理。比如查询中,可能会经常遇到按时间段查询,有时会默认取出一个月的数据。当我们提交数据时,会需要记录当前日期,
- 从SD卡中获取图片资源,或者拍一张新的图片。 先贴代码 获取图片: 注释:拍照获取的话,可以指定图片的保存地址,在此不说明。 CharSeq
- 记录自己用java swing做的第一个简易界面。LoginAction.javapackage com.QQUI0819;import j
- 本文实例讲述了Android编程实现小说阅读器滑动效果的方法。分享给大家供大家参考,具体如下:看过小说都知道小说阅读器翻页有好多种效果,比如