// 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. [WARNING] mod_event_socket.c:2641 IP 172.18.1.112 Rejected by acl "loopback.auto"

    一.目标修改event_socket配置,使之能够建立远端ESL链接. 二.步骤 . vim ../autoload_configs/event_socket.conf.xml . 默认的监听地址配置 ...

  2. Android IPC机制(三)在Android Studio中使用AIDL实现跨进程方法调用

    在上一篇文章Android IPC机制(二)用Messenger进行进程间通信中我们介绍了使用Messenger来进行进程间通信的方法.可是我们能发现Messenger是以串行的方式来处理client ...

  3. notepad++与ISE/Vivado关联

    转自:http://www.cnblogs.com/ninghechuan/p/6172237.html 1.notepad++与vivado关联 打开vivado软件,选择菜单栏“Tools——&g ...

  4. wavwrite注意事项

    前几天群里有人提出一个问题:MATLAB里,同样频率的信号写入/读取,为什么频率感觉不同? 测试code: fs = 2000; f0 = 20; t = 0:1/fs:1; subplot 211 ...

  5. Oracle学习笔记之三,Oracle 11g数据库的启动与关闭

    SQL*PLus命令 SQLPLUS username[/password][@connect_identifier][AS SYSOPER|SYSDAB] 1. 启动数据库实例 STARTUP [n ...

  6. js操作checkbox(复选框)的方法总结

    收集了一些用js代码操作checkbox复选框的代码,分享出来,供需要的朋友参考: <script> //复选框checkbox 处理方法 //搜集整理 www.jbxue.com fun ...

  7. Java 并发多线程处理优秀博文整理

    多线程(11)-Fork/Join-Java并行计算框架 推荐理由:Java在JDK7之后加入了并行计算的框架Fork/Join,本文是对其讲解 分解和合并:Java 也擅长轻松的并行编程! 推荐理由 ...

  8. 使用UINavigationController后导致UIScollView尺寸变化

    转自:http://www.w3c.com.cn/%E4%BD%BF%E7%94%A8uinavigationcontroller%E5%90%8E%E5%AF%BC%E8%87%B4uiscollv ...

  9. 部署hadoop2.7.2 集群 基于zookeeper配置HDFS HA+Federation

    转自:http://www.2cto.com/os/201605/510489.html hadoop1的核心组成是两部分,即HDFS和MapReduce.在hadoop2中变为HDFS和Yarn.新 ...

  10. How to Reuse Old PCs for Solr Search Platform?

    家裡或公司的舊電腦不夠力? 效能慢到想砸爛它們? 朋友或同事有電腦要丟嗎? 我有一個廢物利用的方法, 我收集了四台舊電腦, 組了一個Fully Distributed Mode的Hadoop Clus ...