Package java.awt.image

Examples of java.awt.image.ByteLookupTable


                        invert[j] = (byte)(255-j);
                        ordered[j] = (byte)j;
                    }
                    if (op.equals("lookup1byte")) {
                        ictx.bufImgOp =
                            new LookupOp(new ByteLookupTable(0, invert),
                                         null);
                    } else { // (op.equals("lookup3byte"))
                        byte[][] yellowInvert =
                            new byte[][] { invert, invert, ordered };
                        ictx.bufImgOp =
                            new LookupOp(new ByteLookupTable(0, yellowInvert),
                                         null);
                    }
                } else { // (op.endsWith("short"))
                    short invert[] = new short[256];
                    short ordered[] = new short[256];
View Full Code Here


     * different heights or widths.
     */
    public final void test_LookupOp_filter_DifferentDimensionsTest() {
        // regression test for Harmony-1632
        byte[] array0 = new byte[96];
        ByteLookupTable localByteLookupTable = new ByteLookupTable(1, array0);
        LookupOp localLookupOp = new LookupOp(localByteLookupTable, null);

        BufferedImage localBufferedImage = getImage(5069, 19);

        // filter(BI,BI) non-equal widths
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

        // 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

        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

        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

        byte[] array = new byte[256];
        for (int i = 0; i < 256; i++) {
            array[i] = (byte)i;
        }
        ByteLookupTable table = new ByteLookupTable(0, array);

        op = new LookupOp(table, null);
    }
View Full Code Here

    private static BufferedImageOp getLookupOp() {
        byte[] inv = new byte[256];
        for (int i = 0; i < 256; i++) {
            inv[i] = (byte)(255 - i);
        }
        ByteLookupTable table = new ByteLookupTable(0, inv);
        return new LookupOp(table, null);
    }
View Full Code Here

     * LookupTable data for the four color components of ARGB color model
     */
    private static LookupTable buildLookupTable(TransferFunction [] funcs){
        byte [][] tableData = {funcs[1].getLookupTable(), funcs[2].getLookupTable(),
                               funcs[3].getLookupTable(), funcs[0].getLookupTable()};
        ByteLookupTable lut = new ByteLookupTable(0, tableData);
        return lut;
    }
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.