e675. 翻转缓冲图像
// To create a buffered image, see e666 创建缓冲图像 // Flip the image vertically
AffineTransform tx = AffineTransform.getScaleInstance(1, -1);
tx.translate(0, -image.getHeight(null));
AffineTransformOp op = new AffineTransformOp(tx, AffineTransformOp.TYPE_NEAREST_NEIGHBOR);
bufferedImage = op.filter(bufferedImage, null); // Flip the image horizontally
tx = AffineTransform.getScaleInstance(-1, 1);
tx.translate(-image.getWidth(null), 0);
op = new AffineTransformOp(tx, AffineTransformOp.TYPE_NEAREST_NEIGHBOR);
bufferedImage = op.filter(bufferedImage, null); // Flip the image vertically and horizontally;
// equivalent to rotating the image 180 degrees
tx = AffineTransform.getScaleInstance(-1, -1);
tx.translate(-image.getWidth(null), -image.getHeight(null));
op = new AffineTransformOp(tx, AffineTransformOp.TYPE_NEAREST_NEIGHBOR);
bufferedImage = op.filter(bufferedImage, null);
| Related Examples |
e675. 翻转缓冲图像的更多相关文章
- e672. 缩放,剪取,移动,翻转缓冲图像
AffineTransform tx = new AffineTransform(); tx.scale(scalex, scaley); tx.shear(shiftx, shifty); tx.t ...
- e666. 创建缓冲图像
A buffered image is a type of image whose pixels can be modified. For example, you can draw on a buf ...
- OpenCV计算机视觉学习(11)——图像空间几何变换(图像缩放,图像旋转,图像翻转,图像平移,仿射变换,镜像变换)
如果需要处理的原图及代码,请移步小编的GitHub地址 传送门:请点击我 如果点击有误:https://github.com/LeBron-Jian/ComputerVisionPractice 图像 ...
- e668. 在一组像素中创建缓冲图像
This example demonstrates how to convert a byte array of pixel values that are indices to a color ta ...
- e667. 在给定图像中创建缓冲图像
An Image object cannot be converted to a BufferedImage object. The closest equivalent is to create a ...
- e669. 绘制缓冲图像
To draw on a buffered image, create a graphics context on the buffered image. // Create a graphics c ...
- e671. 在缓冲图像中存取像素
// Get a pixel int rgb = bufferedImage.getRGB(x, y); // Get all the pixels int w = bufferedImage.get ...
- e670. 缓冲图像转换为图像
// This method returns an Image object from a buffered image public static Image toImage(BufferedIma ...
- C#中使用FreeImage库加载Bmp、JPG、PNG、PCX、TGA、PSD等25种格式的图像(源码)。
其实我一直都是喜欢自己去做图像格式的解码的(目前我自己解码的图像格式大概有15种),但是写本文主要原因是基于CSDN的这个帖子的: http://bbs.csdn.net/topics/3905104 ...
随机推荐
- [转]Google 全球 IP 地址库
IP 地址来源:http://www.kookle.co.nr Bulgaria 93.123.23.1 93.123.23.2 93.123.23.3 93.123.23.4 93.123.23.5 ...
- mac 安装android sdk
1.下载sdk http://www.androiddevtools.cn/ 2.解压下载文件到目标文件夹 tar -xzvf android-sdk_r24.4.1-macosx.zip /User ...
- CentOS7设置自定义开机启动,添加自定义系统服务
Centos 系统服务脚本目录: /usr/lib/systemd/ 有系统(system)和用户(user)之分,如需要开机没有登陆情况下就能运行的程序,存在系统服务(system)里,即: lib ...
- [self.view addSubview:vc2.view]程序崩溃的解决办法
- (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. UIButt ...
- 完美解决 IOS系统safari5.0 浏览器页面布局iframe滚动栏失效问题
在iframe外层包一层div,加入例如以下样式: style="-webkit-overflow-scrolling:touch;overflow:auto;" 代码例如以下: ...
- 源码编绎的时候报错 tengine-2.1.0 error: the HTTP rewrite module requires the PCRE library.
./configure: error: the HTTP rewrite module requires the PCRE library. You can either disable the mo ...
- JSP版LCX:端口转发神器 KPortTran
最近接触内网很多,渗透过程中,由于windows和linux的差别以及运行语言环境的限制导致端口转发经常出现问题.于是自己写了个简单的JSP的端口转发脚本.仿造LCX的功能,具有正向.反向.监听三种模 ...
- jquery+ashx checkbox 单选判断是否true 和 false 传值操作
示例图: html标签代码: <p></p> <label for="checkbox" style="float:left" & ...
- C/C++预定义宏
编译器识别预定义的 ANSI/ISO C99 C 预处理宏,Microsoft C++ 实现将提供更多宏.这些预处理器宏不带参数,并且不能重新定义. ANSI 兼容的预定义宏 __FILE__,__L ...
- NSIS安装程序制作工具判断系统是否安装.NET
前段时间忙了很久的系统总算上线了,由于是WinForm程序不能整个文件夹的发给客户使用.所以必须要打包,记得以前在VS2005中是自带部署功能的.现在换了VS2013那个部署功能完全弄不清方向.最后在 ...