// 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. C# 查看动态库的方法

    使用Vs自带工具:开始菜单-->Microsoft Visual Studio 2010--> Visual Studio Tools-->Visual Studio 命令提示符 输 ...

  2. 从一到面试题了解js异步机制:setTimeout 和 Pronmise

    1.毫无疑问setTimeout是最晚输出的 2.请无视undefined,这是浏览器的返回值. 3.new Promise中并不是异步,而.then()后才是异步.

  3. oracle递归层级查询 start with connect by prior

    递归层级查询:start with connect by prior  以部门表作为解析 表结构:dept{id:'主键',name:'部门名称',parent_id:'父亲id'} select * ...

  4. ASP.NET MVC 笔记

    (从今天开始,还是换回默认的代码高亮插件吧...话说此篇仅供个人遗忘后查阅,木有详尽解释...) 1.Controller中的所有Action方法不限制返回值类型,返回值应该至少可以被ToString ...

  5. Silverlight从客户端上传文件到服务器

    这里介绍的是一种利用WebClient手动发送Stream到服务器页面的上传文件方法. 一.服务器接收文件 这里使用一个ASHX页面来接收和保存Silverlight传来的Stream,页面代码如下: ...

  6. macbook中gcc替换为gnu gcc

    macbook中gcc被定义为clang,而正统的gnu gcc却只能使用gcc-7(gcc 7版本),然而,如果修改/usr/bin的链接,还容易造成系统错误,因为mac的工具链和gcc(clang ...

  7. (一)jQuery EasyUI 的EasyLoader载入原理

    1.第一次看了官网的demo.引用的是EasyLoader.js文件,而不是引用jquery.easyui.min.js文件,我就有疑问了,百度一下. jQuery EasyUI是一款基于JQuery ...

  8. dubbo服务端,dubbo客户端,注册中心(zk)之间的心跳

    dubbo客户端和dubbo服务端之间存在心跳,由dubbo客户端主动发起,可参见dubbo源码 HeartbeatTask. dubbo服务端和注册中心(zk)存在心跳,由dubbo服务端发起,这是 ...

  9. eclipse 修改java代码不重启服务器 生效配置

    1.本文目的:用tomcat进行web开发时,修改Java代码往往要重启代码,当工程较大启动较慢时,严重影响效率,本文通过eclipse下tomcat开发和发布web程序时,对一些Java代码一般修改 ...

  10. python AES 加密

    pad: ZeroPadding mode: cbc #!/usr/bin/env python# -*- coding:utf-8 -*-# 这里使用pycrypto‎库# 按照方法:easy_in ...