Java Utililty Methods BufferedImage Transform

List of utility methods to do BufferedImage Transform

Description

The list of methods to do BufferedImage Transform are organized into topic(s).

Method

BufferedImagetransformImage2(BufferedImage image, AffineTransform transform)
transform Image
BufferedImage result = createOptimalImage(image, image.getWidth(), image.getHeight());
Graphics2D g2d = (Graphics2D) result.createGraphics();
g2d.drawImage(image, transform, null);
g2d.dispose();
return result;
BufferedImagetransformToolIcon(BufferedImage source, int width, int height)
transform Tool Icon
BufferedImage result = source;
int rw = result.getWidth();
int rh = result.getHeight();
if (rw != width || rh != height) {
    float scale = Math.min((float) (width / rw), (float) (height / rh));
    int nw = (int) (rw * scale);
    int nh = (int) (rh * scale);
    int x = 0, y = 0;
...
voidtranslateToTopLeftMargin(Graphics2D g2d, PageFormat pageFormat)
This function is not idempotent.
g2d.translate(pageFormat.getImageableX(), pageFormat.getImageableY());