Package java.awt.image

Examples of java.awt.image.BandCombineOp.filter()


                break;
            }

            Raster srcRas = src.getData(wr.getBounds());
            BandCombineOp op = new BandCombineOp(matrix, null);
            op.filter(srcRas, wr);
        } else {
            ColorModel dstCM = getColorModel();
            BufferedImage dstBI;

            if (!dstCM.hasAlpha()) {
View Full Code Here


             * System.out.println("dst: " + dstBI.getWidth() + "x" +
             *                    dstBI.getHeight());
             */

            ColorConvertOp op = new ColorConvertOp(null);
            op.filter(srcBI, dstBI);

            if (dstCM.hasAlpha())
                copyBand(srcWr, srcSM.getNumBands()-1,
                         wr,    getSampleModel().getNumBands()-1);
        }
View Full Code Here

                matrix[3][3] = 1; // Alpha
                break;
            }
            Raster srcRas = src.getData(wr.getBounds());
            BandCombineOp op = new BandCombineOp(matrix, null);
            op.filter(srcRas, wr);
        } else {
            Raster         srcRas = src.getData(wr.getBounds());
            WritableRaster srcWr  = (WritableRaster)srcRas;

            ColorModel dstCM = getColorModel();
View Full Code Here

            // System.out.println("src: " + srcBI.getWidth() + "x" +
            //                    srcBI.getHeight());

            ColorConvertOp op = new ColorConvertOp(dstCM.getColorSpace(),
                                                   null);
            dstBI = op.filter(srcBI, null);

            // System.out.println("After filter:");
           
            for (int i=0; i<dstCM.getColorSpace().getNumComponents(); i++)
                copyBand(dstBI.getRaster(), i, wr,    i);
View Full Code Here

                matrix[0][0] = 1;
            }

            Raster srcRas = src.getData(wr.getBounds());
            BandCombineOp op = new BandCombineOp(matrix, null);
            op.filter(srcRas, wr);
        } else {
            Raster         srcRas = src.getData(wr.getBounds());
            WritableRaster srcWr  = (WritableRaster)srcRas;

            // Divide out alpha if we have it.  We need to do this since
View Full Code Here

                dstBI = new BufferedImage(cmna, dstWr, false, null);
            }

            ColorConvertOp op = new ColorConvertOp(null);
            op.filter(srcBI, dstBI);

            // I never have to 'fix' alpha premult since I take
            // it's value from my source....
            if (dstCM.hasAlpha())
                copyBand(srcWr, sm.getNumBands()-1,
View Full Code Here

                matrix[3][3] = 1; // Alpha
                break;
            }
            Raster srcRas = src.getData(wr.getBounds());
            BandCombineOp op = new BandCombineOp(matrix, null);
            op.filter(srcRas, wr);
        } else {
            ColorModel dstCM = getColorModel();
            if (srcCM.getColorSpace() == dstCM.getColorSpace()) {
                // No transform needed, just reformat data...
                // System.out.println("Bypassing");
View Full Code Here

            // System.out.println("src: " + srcBI.getWidth() + "x" +
            //                    srcBI.getHeight());

            ColorConvertOp op = new ColorConvertOp(dstCM.getColorSpace(),
                                                   null);
            dstBI = op.filter(srcBI, null);

            // System.out.println("After filter:");
           
            WritableRaster wr00 = wr.createWritableTranslatedChild(0,0);
            for (int i=0; i<dstCM.getColorSpace().getNumComponents(); i++)
View Full Code Here

                break;
            }

            Raster srcRas = src.getData(wr.getBounds());
            BandCombineOp op = new BandCombineOp(matrix, null);
            op.filter(srcRas, wr);
        } else {
            ColorModel dstCM = getColorModel();
            BufferedImage dstBI;

            if (!dstCM.hasAlpha()) {
View Full Code Here

             * System.out.println("dst: " + dstBI.getWidth() + "x" +
             *                    dstBI.getHeight());
             */

            ColorConvertOp op = new ColorConvertOp(null);
            op.filter(srcBI, dstBI);

            if (dstCM.hasAlpha())
                copyBand(srcWr, srcSM.getNumBands()-1,
                         wr,    getSampleModel().getNumBands()-1);
        }
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.