Examples of OrdinaryWritableRaster


Examples of org.apache.harmony.awt.gl.image.OrdinaryWritableRaster

        DataBufferFloat dbf = new DataBufferFloat(w * h * 3);
        int offsets[] = new int[]{0,1,2};
        ComponentSampleModel csm = new ComponentSampleModel(DataBuffer.TYPE_FLOAT,
                w, h, 3, 3 * w, offsets);
        WritableRaster wr = new OrdinaryWritableRaster(csm, dbf, new Point(0, 0));
        ColorModel cm = new ComponentColorModel(ColorSpace.getInstance(ColorSpace.CS_sRGB), false, false, Transparency.OPAQUE, DataBuffer.TYPE_FLOAT);
        BufferedImage dst = new BufferedImage(cm, wr, cm.isAlphaPremultiplied(), null);
        Graphics2D g2d = dst.createGraphics();
        g2d.drawImage(src, 0, 0, null);

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.