Package java.awt.image

Examples of java.awt.image.ByteLookupTable


        byte[] lookup = new byte[256];
        for(int i=0; i<256; i++)
            lookup[i] = (byte)(255 - i);

        LookupTable table = new ByteLookupTable(0, lookup);
        java.awt.image.LookupOp inverter = new java.awt.image.LookupOp(table, null);

        // Simply paint the image without and with the lookup filter
        g.setPaint(Color.black);
        g.drawString("Normal / Inverted", 10, 20);
View Full Code Here


        // For what ever reason this makes the Op work correctly.
        // If you remove this, it seems to get the color channels messed
        // up.  The downside is that I suspect that this means we are
        // falling into a more general, and hence slower case, but
        // at least it works....
        operation  =  new LookupOp(new ByteLookupTable(0, tableData), hints)
            { };
    }
View Full Code Here

        // For what ever reason this makes the Op work correctly.
        // If you remove this, it seems to get the color channels messed
        // up.  The downside is that I suspect that this means we are
        // falling into a more general, and hence slower case, but
        // at least it works....
        operation  =  new LookupOp(new ByteLookupTable(0, tableData), hints)
            { };
    }
View Full Code Here

            BufferedImage alpha = new BufferedImage(img.getWidth(), img.getHeight(),
                    BufferedImage.TYPE_BYTE_GRAY);
            Raster raster = img.getData();
            GraphicsUtil.copyBand(raster, cm.getNumColorComponents(), alpha.getRaster(), 0);

            BufferedImageOp op1 = new LookupOp(new ByteLookupTable(0, THRESHOLD_TABLE), null);
            BufferedImage alphat = op1.filter(alpha, null);

            BufferedImage mask;
            if (true) {
                mask = new BufferedImage(targetDim.width, targetDim.height,
View Full Code Here

            BufferedImage alpha = new BufferedImage(img.getWidth(), img.getHeight(),
                    BufferedImage.TYPE_BYTE_GRAY);
            Raster raster = img.getData();
            GraphicsUtil.copyBand(raster, cm.getNumColorComponents(), alpha.getRaster(), 0);

            BufferedImageOp op1 = new LookupOp(new ByteLookupTable(0, THRESHOLD_TABLE), null);
            BufferedImage alphat = op1.filter(alpha, null);

            BufferedImage mask;
            if (true) {
                mask = new BufferedImage(targetDim.width, targetDim.height,
View Full Code Here

            BufferedImage alpha = new BufferedImage(img.getWidth(), img.getHeight(),
                    BufferedImage.TYPE_BYTE_GRAY);
            Raster raster = img.getData();
            GraphicsUtil.copyBand(raster, cm.getNumColorComponents(), alpha.getRaster(), 0);

            BufferedImageOp op1 = new LookupOp(new ByteLookupTable(0, THRESHOLD_TABLE), null);
            BufferedImage alphat = op1.filter(alpha, null);

            BufferedImage mask;
            if (true) {
                mask = new BufferedImage(targetDim.width, targetDim.height,
View Full Code Here

            BufferedImage alpha = new BufferedImage(img.getWidth(), img.getHeight(),
                    BufferedImage.TYPE_BYTE_GRAY);
            Raster raster = img.getData();
            GraphicsUtil.copyBand(raster, cm.getNumColorComponents(), alpha.getRaster(), 0);

            BufferedImageOp op1 = new LookupOp(new ByteLookupTable(0, THRESHOLD_TABLE), null);
            BufferedImage alphat = op1.filter(alpha, null);

            BufferedImage mask;
            if (true) {
                mask = new BufferedImage(targetDim.width, targetDim.height,
View Full Code Here

        byte reverse[] = new byte[256];
        for (int j = 0; j < 200; j++) {
            reverse[j] = (byte) (256 - j);
        }

        ByteLookupTable blut = new ByteLookupTable(0, reverse);
        LookupOp lop = new LookupOp(blut, null);
        lop.filter(image, ret);

        return ret;
    }
View Full Code Here

            if (table.getOffset() != 0) {
                // Right now the native code doesn't support offsets
                return null;
            }
            if (table instanceof ByteLookupTable) {
                ByteLookupTable bt = (ByteLookupTable) table;
                if (lookupByteRaster(src, dst, bt.getTable()) > 0) {
                    retRaster = dst;
                }
            }
            break;
View Full Code Here

            if (table.getOffset() != 0) {
                // Right now the native code doesn't support offsets
                return null;
            }
            if (table instanceof ByteLookupTable) {
                ByteLookupTable bt = (ByteLookupTable) table;
                if (lookupByteBI(src, dst, bt.getTable()) > 0) {
                    retBI = dst;
                }
            }
            break;
View Full Code Here

TOP

Related Classes of java.awt.image.ByteLookupTable

Copyright © 2018 www.massapicom. 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.