List of usage examples for java.awt.image BufferedImage isAlphaPremultiplied
public boolean isAlphaPremultiplied()
From source file:org.jtrfp.trcl.core.ResourceManager.java
private BufferedImage[] getSpecialRAWImage(String name, Color[] palette, int upscalePowerOfTwo) throws IllegalAccessException, FileLoadException, IOException { RAWFile dat = getRAW(name);//from w ww .ja va2 s. c o m dat.setPalette(palette); BufferedImage[] segs = dat.asSegments(upscalePowerOfTwo); for (BufferedImage seg : segs) { Graphics g = seg.getGraphics(); BufferedImage scaled = new BufferedImage(seg.getColorModel(), seg.copyData(null), seg.isAlphaPremultiplied(), null); g.drawImage( scaled.getScaledInstance(seg.getWidth() - 2, seg.getHeight() - 2, Image.SCALE_AREA_AVERAGING), 1, 1, seg.getWidth() - 2, seg.getHeight() - 2, null); g.dispose(); } return segs; }