|
How to perform various transformations on a BufferedImage |
|
|
This Java tip demonstrates a metod of applying different transformations on a buffered
image. Examples of transformations may include Scaling, Shearing, Translating, and Rotating.
AffineTransform transform = new AffineTransform();
transform.scale(scalex, scaley);
transform.shear(shiftx, shifty);
transform.translate(x, y);
transform.rotate(radians, bufferedImage.getWidth()/2,
bufferedImage.getHeight()/2);
AffineTransformOp op = new AffineTransformOp(transform,
AffineTransformOp.TYPE_BILINEAR);
bufferedImage = op.filter(bufferedImage, null);
|
Related Tips
|
Page 1 of 0 ( 0 comments )
You can share your information about this topic using the form below!
Please do not post your questions with this form! Thanks.