Here you can find the source of getTransformedImage(BufferedImage image, double scaleX, double scaleY, double shearX, double shearY)
public static BufferedImage getTransformedImage(BufferedImage image, double scaleX, double scaleY, double shearX, double shearY)
//package com.java2s; //License from project: Apache License import java.awt.geom.AffineTransform; import java.awt.image.AffineTransformOp; import java.awt.image.BufferedImage; public class Main { public static BufferedImage getTransformedImage(BufferedImage image, double scaleX, double scaleY, double shearX, double shearY) { AffineTransform transform = new AffineTransform(); if (scaleX > 0 && scaleY > 0) transform.scale(scaleX, scaleY); if (shearX > 0 && shearY > 0) transform.shear(shearX, shearY); AffineTransformOp op = new AffineTransformOp(transform, AffineTransformOp.TYPE_BILINEAR); BufferedImage dest = new BufferedImage(image.getWidth(), image.getHeight(), image.getType()); op.filter(image, dest);//from w ww . j a v a2 s. c o m return dest; } }