// 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. Android系统架构剖析(一)

          要说剖析,可能这个词可能用的太大了,以下对Android系统的介绍也就是从我个人理解来说吧.       以前有人问我,Android是什么?当时这个问题问的我真的蒙了,我就简单的回了一下 ...

  2. IServerChannelSinkProvider

    (一) Remoting框架图 这是msdn上关于Remoting客户端与服务器端进行通信的示意图.客户端与服务端的通信是通过发送消息来实现的.消息的处理是由客户端,服务端创建的一系列的通信信道来处理 ...

  3. mysqldump 备份某张表 Warning: A partial dump from a server that has GTIDs will by default include the GTIDs of all transactions,

    [root@NB ok]# mysqldump -uemove -h xx.xx.xx.xx -P9906 DBname t_name -p >2t_tname.sqlWarning: A pa ...

  4. angular -- $route API翻译

    $route -$routeProvider服务 -依赖ngRoute模块 $route能够在路径发生改变的时候,渲染不同的视图,调用不同的控制器.它监测了$location.url(),然后根据路径 ...

  5. python鸭子类型(duck type)

    1.什么是鸭子类型顾名思义,就是看起来像鸭子的类型,就可以叫做鸭子类型所以,鸭子类型是一种不严格的类型,弱类型有相同方法的类型,可以归为一类鸭子.2.鸭子类型示例 class dog: def run ...

  6. Oracle PLSQL Demo - 12.定义包体[Define PACKAGE BODY]

    CREATE OR REPLACE PACKAGE BODY temp_package_demo is FUNCTION f_demo(userid NUMBER) RETURN BOOLEAN IS ...

  7. javascript publish/subscribe or observer pattern

     定义 定义一对多的对象封装,目标对象状态发生变化,它所有的接受者都会收到通知并做相应的更新. 使用频率:5/5 最高 概要 观察者模式,也就是发布者/订阅者模式,当发布者发布一个通知的时候,订阅者就 ...

  8. wpf/Silverlight/wp中如何绑定模板中的属性

    <Style TargetType="{x:Type TabItem}" x:Key="EditorTabItemStyle"> <Sette ...

  9. zookeeper原生API做java客户端

    简介 本文是使用apache提供的原生api做zookeeper客户端 jar包 zookeeper-3.4.5.jar   Demo package bjsxt.zookeeper.base; im ...

  10. Android开发系列(十七):读取assets文件夹下的数据库文件

    在做Android应用的时候,不可避免要用到数据库.可是当我们把应用的apk部署到真机上的时候,已经创建好的数据库及其里边的数据是不能随着apk一起安装到真机上的. (PS:这篇博客攻克了我前面博客中 ...