List of usage examples for java.awt.image BufferedImage BufferedImage
public BufferedImage(int width, int height, int imageType)
From source file:Main.java
public static void main(String[] argv) throws Exception { BufferedImage bufferedImage = new BufferedImage(200, 200, BufferedImage.TYPE_BYTE_INDEXED); AffineTransform tx = AffineTransform.getScaleInstance(-1, 1); tx.translate(-bufferedImage.getWidth(null), 0); AffineTransformOp op = new AffineTransformOp(tx, AffineTransformOp.TYPE_NEAREST_NEIGHBOR); bufferedImage = op.filter(bufferedImage, null); }
From source file:Main.java
public static void main(String[] argv) throws Exception { BufferedImage bufferedImage = new BufferedImage(200, 200, BufferedImage.TYPE_BYTE_INDEXED); AffineTransform tx = AffineTransform.getScaleInstance(-1, -1); tx.translate(-bufferedImage.getWidth(null), -bufferedImage.getHeight(null)); AffineTransformOp op = new AffineTransformOp(tx, AffineTransformOp.TYPE_NEAREST_NEIGHBOR); bufferedImage = op.filter(bufferedImage, null); }
From source file:Main.java
public static void main(String[] argv) throws Exception { BufferedImage bufferedImage = new BufferedImage(200, 200, BufferedImage.TYPE_BYTE_INDEXED); AffineTransform tx = new AffineTransform(); tx.shear(2, 3);//from www. j a v a2 s.co m AffineTransformOp op = new AffineTransformOp(tx, AffineTransformOp.TYPE_BILINEAR); bufferedImage = op.filter(bufferedImage, null); }
From source file:Main.java
public static void main(String[] argv) throws Exception { BufferedImage bufferedImage = new BufferedImage(200, 200, BufferedImage.TYPE_BYTE_INDEXED); AffineTransform tx = AffineTransform.getScaleInstance(1, -1); tx.translate(0, -bufferedImage.getHeight(null)); AffineTransformOp op = new AffineTransformOp(tx, AffineTransformOp.TYPE_NEAREST_NEIGHBOR); bufferedImage = op.filter(bufferedImage, null); }
From source file:Main.java
public static void main(String[] argv) throws Exception { BufferedImage bufferedImage = new BufferedImage(200, 200, BufferedImage.TYPE_BYTE_INDEXED); AffineTransform tx = new AffineTransform(); tx.translate(2, 1);//w w w.j a v a 2 s . c o m AffineTransformOp op = new AffineTransformOp(tx, AffineTransformOp.TYPE_BILINEAR); bufferedImage = op.filter(bufferedImage, null); }
From source file:Main.java
public static void main(String[] argv) throws Exception { BufferedImage bufferedImage = new BufferedImage(200, 200, BufferedImage.TYPE_BYTE_INDEXED); AffineTransform tx = new AffineTransform(); tx.scale(1, 2);/*from w w w . j av a 2 s . c om*/ AffineTransformOp op = new AffineTransformOp(tx, AffineTransformOp.TYPE_BILINEAR); bufferedImage = op.filter(bufferedImage, null); }
From source file:Main.java
public static void main(String[] argv) throws Exception { BufferedImage bufferedImage = new BufferedImage(200, 200, BufferedImage.TYPE_BYTE_INDEXED); AffineTransform tx = new AffineTransform(); tx.rotate(0.5, bufferedImage.getWidth() / 2, bufferedImage.getHeight() / 2); AffineTransformOp op = new AffineTransformOp(tx, AffineTransformOp.TYPE_BILINEAR); bufferedImage = op.filter(bufferedImage, null); }
From source file:Main.java
public static void main(String[] argv) throws Exception { BufferedImage bufferedImage = new BufferedImage(200, 200, BufferedImage.TYPE_BYTE_INDEXED); Kernel kernel = new Kernel(3, 3, new float[] { -1, -1, -1, -1, 9, -1, -1, -1, -1 }); BufferedImageOp op = new ConvolveOp(kernel); bufferedImage = op.filter(bufferedImage, null); }
From source file:Main.java
public static void main(String[] argv) throws Exception { BufferedImage bufferedImage = new BufferedImage(200, 200, BufferedImage.TYPE_BYTE_INDEXED); Kernel kernel = new Kernel(3, 3, new float[] { 1f / 9f, 1f / 9f, 1f / 9f, 1f / 9f, 1f / 9f, 1f / 9f, 1f / 9f, 1f / 9f, 1f / 9f }); BufferedImageOp op = new ConvolveOp(kernel); bufferedImage = op.filter(bufferedImage, null); }
From source file:Main.java
public static void main(String[] argv) throws Exception { BufferedImage bufferedImage = new BufferedImage(200, 200, BufferedImage.TYPE_BYTE_INDEXED); Kernel kernel = new Kernel(3, 3, new float[] { -2, 0, 0, 0, 1, 0, 0, 0, 2 }); BufferedImageOp op = new ConvolveOp(kernel); bufferedImage = op.filter(bufferedImage, null); }