List of utility methods to do BufferedImage Flip
BufferedImage | verticalFlip(BufferedImage img) vertical Flip int w = img.getWidth(); int h = img.getHeight(); BufferedImage flippedImage = new BufferedImage(w, h, img.getColorModel().getTransparency()); Graphics2D g = flippedImage.createGraphics(); g.drawImage(img, 0, 0, w, h, 0, h, w, 0, null); g.dispose(); return flippedImage; |
BufferedImage | verticalFlip(BufferedImage img) Flips image raster vertically if (null == img) return null; int w = img.getWidth(); int h = img.getHeight(); BufferedImage flipImg = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB); Graphics2D g2d = flipImg.createGraphics(); java.awt.Composite prevComposite = g2d.getComposite(); g2d.setComposite(java.awt.AlphaComposite.Src); ... |