// 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. 翻转缓冲图像的更多相关文章

  1. e672. 缩放,剪取,移动,翻转缓冲图像

    AffineTransform tx = new AffineTransform(); tx.scale(scalex, scaley); tx.shear(shiftx, shifty); tx.t ...

  2. e666. 创建缓冲图像

    A buffered image is a type of image whose pixels can be modified. For example, you can draw on a buf ...

  3. OpenCV计算机视觉学习(11)——图像空间几何变换(图像缩放,图像旋转,图像翻转,图像平移,仿射变换,镜像变换)

    如果需要处理的原图及代码,请移步小编的GitHub地址 传送门:请点击我 如果点击有误:https://github.com/LeBron-Jian/ComputerVisionPractice 图像 ...

  4. e668. 在一组像素中创建缓冲图像

    This example demonstrates how to convert a byte array of pixel values that are indices to a color ta ...

  5. e667. 在给定图像中创建缓冲图像

    An Image object cannot be converted to a BufferedImage object. The closest equivalent is to create a ...

  6. e669. 绘制缓冲图像

    To draw on a buffered image, create a graphics context on the buffered image. // Create a graphics c ...

  7. e671. 在缓冲图像中存取像素

    // Get a pixel int rgb = bufferedImage.getRGB(x, y); // Get all the pixels int w = bufferedImage.get ...

  8. e670. 缓冲图像转换为图像

    // This method returns an Image object from a buffered image public static Image toImage(BufferedIma ...

  9. C#中使用FreeImage库加载Bmp、JPG、PNG、PCX、TGA、PSD等25种格式的图像(源码)。

    其实我一直都是喜欢自己去做图像格式的解码的(目前我自己解码的图像格式大概有15种),但是写本文主要原因是基于CSDN的这个帖子的: http://bbs.csdn.net/topics/3905104 ...

随机推荐

  1. [转]Windows 7自带很好用的磁盘检查与修复的环境

    大家可能都知道Windows 7自带很好用的检查与修复的环境.在启动系统前按F8(就是进入安全模式的方法),Windows 7会有一个修复计算机的选项.选择进入,装载一些必要的文件之后,选择语言.登陆 ...

  2. EF 多线程TransactionScope事务异常"事务EFTransaction类定义:与另一个进程被死锁在 锁 资源上,并且已被选作死锁牺牲品。请重新运行该事务。"

    解决方案代码一:使用lock锁定 //对于锁推荐使用静态私有静态变量 private readonly static object _MyLock = new object(); /// <su ...

  3. 在python中配置MySQL数据库

    MySQL数据库(1) 尽管用文件形式将数据保存到磁盘,已经是一种不错的方式.但是,人们还是发明了更具有格式化特点,并且写入和读取更快速便捷的东西——数据库(如果阅读港台的资料,它们称之为“资料库”) ...

  4. 使用 docker 搭建 openvpn,创建、删除用户证书

    我自己的配置,服务器:ubuntu16.04 + docker 17.12.0-ce:客户端:win10 + openvpn2.4.5 1 在dockerhub上搜索 openvpn,我是用的是 进去 ...

  5. 《Effective Java》读书笔记一(创建与销毁对象)

    No1 考虑用静态工厂方法代替构造器 静态工厂方法优势: 它们有名称,阅读性增强,如:BigInteger.probablePrime: 不必每次调用它们的时候都创建一个新对象: 它们可以返回原返回类 ...

  6. 重温java中的String,StringBuffer,StringBuilder类

    不论什么一个系统在开发的过程中, 相信都不会缺少对字符串的处理. 在 java 语言中, 用来处理字符串的的类经常使用的有 3 个: String.StringBuffer.StringBuilder ...

  7. CentOS配置SSH远程连接

    本文为大家介绍Centos中配置SSH远程连接的方法,只是简单配置,供初学者参考. 1.配置IP#setup 选择 NetWork configuration 选择 Device configurat ...

  8. nginx中配置404错误页面的教程

    什么是404页面如果网站出了问题,或者用户试图访问一个并不存在的页面时,此时服务器会返回代码为404的错误信息,此时对应页面就是404页面.404页面的默认内容和具体的服务器有关.如果后台用的是NGI ...

  9. . net 源代码调试

    对于 .net framework 中的代码,光拿 Reflector 看是不够过瘾的,如果能够调试进去就好了! 其实,微软是提供了一套 sourcecode 的下载的: http://referen ...

  10. Linux Shell sort排序常用命令(转载)

    转载自:http://blog.csdn.net/monkeyduck/article/details/10097829 1 sort的工作原理 sort将文件的每一行作为一个单位,相互比较,比较原则 ...