Java Code Examples for java.awt.image.LookupOp#filter()
The following examples show how to use
java.awt.image.LookupOp#filter() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: IntImageReverseTest.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) { LookupTable tbl = createReverseTable(); LookupOp op = new LookupOp(tbl, null); for (ImageType t : ImageType.values()) { System.out.print(t); BufferedImage src = createSourceImage(t); BufferedImage dst = op.filter(src, null); int rgb = dst.getRGB(0, 0); System.out.printf(" Result: 0x%X ", rgb); if (rgb != argbReverse) { throw new RuntimeException("Test failed."); } System.out.println("Passed."); } }
Example 2
Source File: IntImageReverseTest.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) { LookupTable tbl = createReverseTable(); LookupOp op = new LookupOp(tbl, null); for (ImageType t : ImageType.values()) { System.out.print(t); BufferedImage src = createSourceImage(t); BufferedImage dst = op.filter(src, null); int rgb = dst.getRGB(0, 0); System.out.printf(" Result: 0x%X ", rgb); if (rgb != argbReverse) { throw new RuntimeException("Test failed."); } System.out.println("Passed."); } }
Example 3
Source File: IntImageReverseTest.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) { LookupTable tbl = createReverseTable(); LookupOp op = new LookupOp(tbl, null); for (ImageType t : ImageType.values()) { System.out.print(t); BufferedImage src = createSourceImage(t); BufferedImage dst = op.filter(src, null); int rgb = dst.getRGB(0, 0); System.out.printf(" Result: 0x%X ", rgb); if (rgb != argbReverse) { throw new RuntimeException("Test failed."); } System.out.println("Passed."); } }
Example 4
Source File: IntImageReverseTest.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) { LookupTable tbl = createReverseTable(); LookupOp op = new LookupOp(tbl, null); for (ImageType t : ImageType.values()) { System.out.print(t); BufferedImage src = createSourceImage(t); BufferedImage dst = op.filter(src, null); int rgb = dst.getRGB(0, 0); System.out.printf(" Result: 0x%X ", rgb); if (rgb != argbReverse) { throw new RuntimeException("Test failed."); } System.out.println("Passed."); } }
Example 5
Source File: IntImageReverseTest.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) { LookupTable tbl = createReverseTable(); LookupOp op = new LookupOp(tbl, null); for (ImageType t : ImageType.values()) { System.out.print(t); BufferedImage src = createSourceImage(t); BufferedImage dst = op.filter(src, null); int rgb = dst.getRGB(0, 0); System.out.printf(" Result: 0x%X ", rgb); if (rgb != argbReverse) { throw new RuntimeException("Test failed."); } System.out.println("Passed."); } }
Example 6
Source File: IntImageReverseTest.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) { LookupTable tbl = createReverseTable(); LookupOp op = new LookupOp(tbl, null); for (ImageType t : ImageType.values()) { System.out.print(t); BufferedImage src = createSourceImage(t); BufferedImage dst = op.filter(src, null); int rgb = dst.getRGB(0, 0); System.out.printf(" Result: 0x%X ", rgb); if (rgb != argbReverse) { throw new RuntimeException("Test failed."); } System.out.println("Passed."); } }
Example 7
Source File: IntImageReverseTest.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) { LookupTable tbl = createReverseTable(); LookupOp op = new LookupOp(tbl, null); for (ImageType t : ImageType.values()) { System.out.print(t); BufferedImage src = createSourceImage(t); BufferedImage dst = op.filter(src, null); int rgb = dst.getRGB(0, 0); System.out.printf(" Result: 0x%X ", rgb); if (rgb != argbReverse) { throw new RuntimeException("Test failed."); } System.out.println("Passed."); } }
Example 8
Source File: IntImageReverseTest.java From hottub with GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) { LookupTable tbl = createReverseTable(); LookupOp op = new LookupOp(tbl, null); for (ImageType t : ImageType.values()) { System.out.print(t); BufferedImage src = createSourceImage(t); BufferedImage dst = op.filter(src, null); int rgb = dst.getRGB(0, 0); System.out.printf(" Result: 0x%X ", rgb); if (rgb != argbReverse) { throw new RuntimeException("Test failed."); } System.out.println("Passed."); } }
Example 9
Source File: IntImageReverseTest.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) { LookupTable tbl = createReverseTable(); LookupOp op = new LookupOp(tbl, null); for (ImageType t : ImageType.values()) { System.out.print(t); BufferedImage src = createSourceImage(t); BufferedImage dst = op.filter(src, null); int rgb = dst.getRGB(0, 0); System.out.printf(" Result: 0x%X ", rgb); if (rgb != argbReverse) { throw new RuntimeException("Test failed."); } System.out.println("Passed."); } }
Example 10
Source File: IntImageReverseTest.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) { LookupTable tbl = createReverseTable(); LookupOp op = new LookupOp(tbl, null); for (ImageType t : ImageType.values()) { System.out.print(t); BufferedImage src = createSourceImage(t); BufferedImage dst = op.filter(src, null); int rgb = dst.getRGB(0, 0); System.out.printf(" Result: 0x%X ", rgb); if (rgb != argbReverse) { throw new RuntimeException("Test failed."); } System.out.println("Passed."); } }
Example 11
Source File: IntImageReverseTest.java From jdk8u_jdk with GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) { LookupTable tbl = createReverseTable(); LookupOp op = new LookupOp(tbl, null); for (ImageType t : ImageType.values()) { System.out.print(t); BufferedImage src = createSourceImage(t); BufferedImage dst = op.filter(src, null); int rgb = dst.getRGB(0, 0); System.out.printf(" Result: 0x%X ", rgb); if (rgb != argbReverse) { throw new RuntimeException("Test failed."); } System.out.println("Passed."); } }
Example 12
Source File: IntImageReverseTest.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) { LookupTable tbl = createReverseTable(); LookupOp op = new LookupOp(tbl, null); for (ImageType t : ImageType.values()) { System.out.print(t); BufferedImage src = createSourceImage(t); BufferedImage dst = op.filter(src, null); int rgb = dst.getRGB(0, 0); System.out.printf(" Result: 0x%X ", rgb); if (rgb != argbReverse) { throw new RuntimeException("Test failed."); } System.out.println("Passed."); } }
Example 13
Source File: IntImageReverseTest.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) { LookupTable tbl = createReverseTable(); LookupOp op = new LookupOp(tbl, null); for (ImageType t : ImageType.values()) { System.out.print(t); BufferedImage src = createSourceImage(t); BufferedImage dst = op.filter(src, null); int rgb = dst.getRGB(0, 0); System.out.printf(" Result: 0x%X ", rgb); if (rgb != argbReverse) { throw new RuntimeException("Test failed."); } System.out.println("Passed."); } }
Example 14
Source File: ApplicationFrame.java From filthy-rich-clients with BSD 3-Clause "New" or "Revised" License | 5 votes |
private void buildLookupOpTab(JTabbedPane tabbedPane) { BufferedImage dstImage = null; short[] data = new short[256]; for (int i = 0; i < 256; i++) { data[i] = (short) (255 - i); } LookupTable lookupTable = new ShortLookupTable(0, data); LookupOp op = new LookupOp(lookupTable, null); dstImage = op.filter(sourceImage, null); tabbedPane.add("Lookup", new JLabel(new ImageIcon(dstImage))); }