if (orientation == 0) {
destinationImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
} else if (orientation == 3) {
destinationImage = new BufferedImage(height, width, BufferedImage.TYPE_INT_RGB);
transform.translate(0, sourceImage.getWidth(null));
transform.quadrantRotate(-1);
} else if (orientation == 6) {
destinationImage = new BufferedImage(height, width, BufferedImage.TYPE_INT_RGB);
transform.translate(sourceImage.getHeight(null), 0);
transform.rotate(1);
} else {