类java.awt.image.ImagingOpException源码实例Demo

下面列出了怎么用java.awt.image.ImagingOpException的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: jdk8u-jdk   文件: EdgeNoOpCrash.java
private static void crashTest() {
    Raster src = createSrcRaster();
    WritableRaster dst = createDstRaster();
    ConvolveOp op = createConvolveOp(ConvolveOp.EDGE_NO_OP);
    try {
        op.filter(src, dst);
    } catch (ImagingOpException e) {
        /*
         * The test pair of source and destination rasters
         * may cause failure of the medialib convolution routine,
         * so this exception is expected.
         *
         * The JVM crash is the only manifestation of this
         * test failure.
         */
    }
    System.out.println("Test PASSED.");
}
 
源代码2 项目: dragonwell8_jdk   文件: EdgeNoOpCrash.java
private static void crashTest() {
    Raster src = createSrcRaster();
    WritableRaster dst = createDstRaster();
    ConvolveOp op = createConvolveOp(ConvolveOp.EDGE_NO_OP);
    try {
        op.filter(src, dst);
    } catch (ImagingOpException e) {
        /*
         * The test pair of source and destination rasters
         * may cause failure of the medialib convolution routine,
         * so this exception is expected.
         *
         * The JVM crash is the only manifestation of this
         * test failure.
         */
    }
    System.out.println("Test PASSED.");
}
 
源代码3 项目: dragonwell8_jdk   文件: OpCompatibleImageTest.java
public void doTest(int type) {
    System.out.println("Test for type " + describeType(type));

    BufferedImage src = createTestImage(type);

    BufferedImage res = null;

    System.out.println("Testing null destination...");
    try {
        res = op.filter(src, null);
    } catch (ImagingOpException e) {
        throw new RuntimeException("Test FAILED!", e);
    }

    if (res == null ||
        ((src.getType() != BufferedImage.TYPE_BYTE_INDEXED) &&
         (res.getType() != src.getType())))
    {
        throw new RuntimeException("Test FAILED!");
    }
    System.out.println("Test PASSED.");
}
 
源代码4 项目: TencentKona-8   文件: EdgeNoOpCrash.java
private static void crashTest() {
    Raster src = createSrcRaster();
    WritableRaster dst = createDstRaster();
    ConvolveOp op = createConvolveOp(ConvolveOp.EDGE_NO_OP);
    try {
        op.filter(src, dst);
    } catch (ImagingOpException e) {
        /*
         * The test pair of source and destination rasters
         * may cause failure of the medialib convolution routine,
         * so this exception is expected.
         *
         * The JVM crash is the only manifestation of this
         * test failure.
         */
    }
    System.out.println("Test PASSED.");
}
 
源代码5 项目: jdk8u60   文件: OpCompatibleImageTest.java
public void doTest(int type) {
    System.out.println("Test for type " + describeType(type));

    BufferedImage src = createTestImage(type);

    BufferedImage res = null;

    System.out.println("Testing null destination...");
    try {
        res = op.filter(src, null);
    } catch (ImagingOpException e) {
        throw new RuntimeException("Test FAILED!", e);
    }

    if (res == null ||
        ((src.getType() != BufferedImage.TYPE_BYTE_INDEXED) &&
         (res.getType() != src.getType())))
    {
        throw new RuntimeException("Test FAILED!");
    }
    System.out.println("Test PASSED.");
}
 
源代码6 项目: openjdk-jdk8u   文件: EdgeNoOpCrash.java
private static void crashTest() {
    Raster src = createSrcRaster();
    WritableRaster dst = createDstRaster();
    ConvolveOp op = createConvolveOp(ConvolveOp.EDGE_NO_OP);
    try {
        op.filter(src, dst);
    } catch (ImagingOpException e) {
        /*
         * The test pair of source and destination rasters
         * may cause failure of the medialib convolution routine,
         * so this exception is expected.
         *
         * The JVM crash is the only manifestation of this
         * test failure.
         */
    }
    System.out.println("Test PASSED.");
}
 
源代码7 项目: openjdk-jdk8u   文件: OpCompatibleImageTest.java
public void doTest(int type) {
    System.out.println("Test for type " + describeType(type));

    BufferedImage src = createTestImage(type);

    BufferedImage res = null;

    System.out.println("Testing null destination...");
    try {
        res = op.filter(src, null);
    } catch (ImagingOpException e) {
        throw new RuntimeException("Test FAILED!", e);
    }

    if (res == null ||
        ((src.getType() != BufferedImage.TYPE_BYTE_INDEXED) &&
         (res.getType() != src.getType())))
    {
        throw new RuntimeException("Test FAILED!");
    }
    System.out.println("Test PASSED.");
}
 
源代码8 项目: openjdk-jdk8u-backup   文件: EdgeNoOpCrash.java
private static void crashTest() {
    Raster src = createSrcRaster();
    WritableRaster dst = createDstRaster();
    ConvolveOp op = createConvolveOp(ConvolveOp.EDGE_NO_OP);
    try {
        op.filter(src, dst);
    } catch (ImagingOpException e) {
        /*
         * The test pair of source and destination rasters
         * may cause failure of the medialib convolution routine,
         * so this exception is expected.
         *
         * The JVM crash is the only manifestation of this
         * test failure.
         */
    }
    System.out.println("Test PASSED.");
}
 
public void doTest(int type) {
    System.out.println("Test for type " + describeType(type));

    BufferedImage src = createTestImage(type);

    BufferedImage res = null;

    System.out.println("Testing null destination...");
    try {
        res = op.filter(src, null);
    } catch (ImagingOpException e) {
        throw new RuntimeException("Test FAILED!", e);
    }

    if (res == null ||
        ((src.getType() != BufferedImage.TYPE_BYTE_INDEXED) &&
         (res.getType() != src.getType())))
    {
        throw new RuntimeException("Test FAILED!");
    }
    System.out.println("Test PASSED.");
}
 
源代码10 项目: openjdk-jdk9   文件: EdgeNoOpCrash.java
private static void crashTest() {
    Raster src = createSrcRaster();
    WritableRaster dst = createDstRaster();
    ConvolveOp op = createConvolveOp(ConvolveOp.EDGE_NO_OP);
    try {
        op.filter(src, dst);
    } catch (ImagingOpException e) {
        /*
         * The test pair of source and destination rasters
         * may cause failure of the medialib convolution routine,
         * so this exception is expected.
         *
         * The JVM crash is the only manifestation of this
         * test failure.
         */
    }
    System.out.println("Test PASSED.");
}
 
源代码11 项目: openjdk-jdk9   文件: OpCompatibleImageTest.java
public void doTest(int type) {
    System.out.println("Test for type " + describeType(type));

    BufferedImage src = createTestImage(type);

    BufferedImage res = null;

    System.out.println("Testing null destination...");
    try {
        res = op.filter(src, null);
    } catch (ImagingOpException e) {
        throw new RuntimeException("Test FAILED!", e);
    }

    if (res == null ||
        ((src.getType() != BufferedImage.TYPE_BYTE_INDEXED) &&
         (res.getType() != src.getType())))
    {
        throw new RuntimeException("Test FAILED!");
    }
    System.out.println("Test PASSED.");
}
 
源代码12 项目: jdk8u-jdk   文件: EdgeNoOpCrash.java
private static void crashTest() {
    Raster src = createSrcRaster();
    WritableRaster dst = createDstRaster();
    ConvolveOp op = createConvolveOp(ConvolveOp.EDGE_NO_OP);
    try {
        op.filter(src, dst);
    } catch (ImagingOpException e) {
        /*
         * The test pair of source and destination rasters
         * may cause failure of the medialib convolution routine,
         * so this exception is expected.
         *
         * The JVM crash is the only manifestation of this
         * test failure.
         */
    }
    System.out.println("Test PASSED.");
}
 
源代码13 项目: jdk8u-jdk   文件: OpCompatibleImageTest.java
public void doTest(int type) {
    System.out.println("Test for type " + describeType(type));

    BufferedImage src = createTestImage(type);

    BufferedImage res = null;

    System.out.println("Testing null destination...");
    try {
        res = op.filter(src, null);
    } catch (ImagingOpException e) {
        throw new RuntimeException("Test FAILED!", e);
    }

    if (res == null ||
        ((src.getType() != BufferedImage.TYPE_BYTE_INDEXED) &&
         (res.getType() != src.getType())))
    {
        throw new RuntimeException("Test FAILED!");
    }
    System.out.println("Test PASSED.");
}
 
源代码14 项目: hottub   文件: EdgeNoOpCrash.java
private static void crashTest() {
    Raster src = createSrcRaster();
    WritableRaster dst = createDstRaster();
    ConvolveOp op = createConvolveOp(ConvolveOp.EDGE_NO_OP);
    try {
        op.filter(src, dst);
    } catch (ImagingOpException e) {
        /*
         * The test pair of source and destination rasters
         * may cause failure of the medialib convolution routine,
         * so this exception is expected.
         *
         * The JVM crash is the only manifestation of this
         * test failure.
         */
    }
    System.out.println("Test PASSED.");
}
 
源代码15 项目: openjdk-8-source   文件: EdgeNoOpCrash.java
private static void crashTest() {
    Raster src = createSrcRaster();
    WritableRaster dst = createDstRaster();
    ConvolveOp op = createConvolveOp(ConvolveOp.EDGE_NO_OP);
    try {
        op.filter(src, dst);
    } catch (ImagingOpException e) {
        /*
         * The test pair of source and destination rasters
         * may cause failure of the medialib convolution routine,
         * so this exception is expected.
         *
         * The JVM crash is the only manifestation of this
         * test failure.
         */
    }
    System.out.println("Test PASSED.");
}
 
源代码16 项目: openjdk-8-source   文件: OpCompatibleImageTest.java
public void doTest(int type) {
    System.out.println("Test for type " + describeType(type));

    BufferedImage src = createTestImage(type);

    BufferedImage res = null;

    System.out.println("Testing null destination...");
    try {
        res = op.filter(src, null);
    } catch (ImagingOpException e) {
        throw new RuntimeException("Test FAILED!", e);
    }

    if (res == null ||
        ((src.getType() != BufferedImage.TYPE_BYTE_INDEXED) &&
         (res.getType() != src.getType())))
    {
        throw new RuntimeException("Test FAILED!");
    }
    System.out.println("Test PASSED.");
}
 
源代码17 项目: jdk8u-jdk   文件: OpCompatibleImageTest.java
public void doTest(int type) {
    System.out.println("Test for type " + describeType(type));

    BufferedImage src = createTestImage(type);

    BufferedImage res = null;

    System.out.println("Testing null destination...");
    try {
        res = op.filter(src, null);
    } catch (ImagingOpException e) {
        throw new RuntimeException("Test FAILED!", e);
    }

    if (res == null ||
        ((src.getType() != BufferedImage.TYPE_BYTE_INDEXED) &&
         (res.getType() != src.getType())))
    {
        throw new RuntimeException("Test FAILED!");
    }
    System.out.println("Test PASSED.");
}
 
源代码18 项目: openjdk-8   文件: EdgeNoOpCrash.java
private static void crashTest() {
    Raster src = createSrcRaster();
    WritableRaster dst = createDstRaster();
    ConvolveOp op = createConvolveOp(ConvolveOp.EDGE_NO_OP);
    try {
        op.filter(src, dst);
    } catch (ImagingOpException e) {
        /*
         * The test pair of source and destination rasters
         * may cause failure of the medialib convolution routine,
         * so this exception is expected.
         *
         * The JVM crash is the only manifestation of this
         * test failure.
         */
    }
    System.out.println("Test PASSED.");
}
 
源代码19 项目: jdk8u_jdk   文件: EdgeNoOpCrash.java
private static void crashTest() {
    Raster src = createSrcRaster();
    WritableRaster dst = createDstRaster();
    ConvolveOp op = createConvolveOp(ConvolveOp.EDGE_NO_OP);
    try {
        op.filter(src, dst);
    } catch (ImagingOpException e) {
        /*
         * The test pair of source and destination rasters
         * may cause failure of the medialib convolution routine,
         * so this exception is expected.
         *
         * The JVM crash is the only manifestation of this
         * test failure.
         */
    }
    System.out.println("Test PASSED.");
}
 
源代码20 项目: jdk8u_jdk   文件: OpCompatibleImageTest.java
public void doTest(int type) {
    System.out.println("Test for type " + describeType(type));

    BufferedImage src = createTestImage(type);

    BufferedImage res = null;

    System.out.println("Testing null destination...");
    try {
        res = op.filter(src, null);
    } catch (ImagingOpException e) {
        throw new RuntimeException("Test FAILED!", e);
    }

    if (res == null ||
        ((src.getType() != BufferedImage.TYPE_BYTE_INDEXED) &&
         (res.getType() != src.getType())))
    {
        throw new RuntimeException("Test FAILED!");
    }
    System.out.println("Test PASSED.");
}
 
源代码21 项目: RemoteSupportTool   文件: AsyncScalr.java
/**
 * @see Scalr#resize(BufferedImage, Method, Mode, int, BufferedImageOp...)
 */
public static Future<BufferedImage> resize(final BufferedImage src,
                                           final Method scalingMethod, final Mode resizeMode,
                                           final int targetSize, final BufferedImageOp... ops)
        throws IllegalArgumentException, ImagingOpException {
    checkService();

    return service.submit(new Callable<BufferedImage>() {
        public BufferedImage call() throws Exception {
            return Scalr.resize(src, scalingMethod, resizeMode, targetSize,
                    ops);
        }
    });
}
 
源代码22 项目: dragonwell8_jdk   文件: SamePackingTypeTest.java
public static void main(String[] args) {
    BufferedImageOp op = createTestOp();

    try {
        System.out.print("Integer-based images... ");
        doTest(op, TYPE_INT_ARGB, TYPE_INT_ARGB_PRE);
        System.out.println("done.");

        System.out.print("Byte-based images... ");
        doTest(op, TYPE_4BYTE_ABGR, TYPE_4BYTE_ABGR_PRE);
        System.out.println("done");
    } catch (ImagingOpException e) {
        throw new RuntimeException("Test FAILED", e);
    }
}
 
源代码23 项目: TencentKona-8   文件: SamePackingTypeTest.java
public static void main(String[] args) {
    BufferedImageOp op = createTestOp();

    try {
        System.out.print("Integer-based images... ");
        doTest(op, TYPE_INT_ARGB, TYPE_INT_ARGB_PRE);
        System.out.println("done.");

        System.out.print("Byte-based images... ");
        doTest(op, TYPE_4BYTE_ABGR, TYPE_4BYTE_ABGR_PRE);
        System.out.println("done");
    } catch (ImagingOpException e) {
        throw new RuntimeException("Test FAILED", e);
    }
}
 
源代码24 项目: RemoteSupportTool   文件: AsyncScalr.java
/**
 * @see Scalr#resize(BufferedImage, Method, Mode, int, int,
 * BufferedImageOp...)
 */
public static Future<BufferedImage> resize(final BufferedImage src,
                                           final Method scalingMethod, final Mode resizeMode,
                                           final int targetWidth, final int targetHeight,
                                           final BufferedImageOp... ops) throws IllegalArgumentException,
        ImagingOpException {
    checkService();

    return service.submit(new Callable<BufferedImage>() {
        public BufferedImage call() throws Exception {
            return Scalr.resize(src, scalingMethod, resizeMode,
                    targetWidth, targetHeight, ops);
        }
    });
}
 
源代码25 项目: jdk8u60   文件: SamePackingTypeTest.java
public static void main(String[] args) {
    BufferedImageOp op = createTestOp();

    try {
        System.out.print("Integer-based images... ");
        doTest(op, TYPE_INT_ARGB, TYPE_INT_ARGB_PRE);
        System.out.println("done.");

        System.out.print("Byte-based images... ");
        doTest(op, TYPE_4BYTE_ABGR, TYPE_4BYTE_ABGR_PRE);
        System.out.println("done");
    } catch (ImagingOpException e) {
        throw new RuntimeException("Test FAILED", e);
    }
}
 
源代码26 项目: openjdk-jdk8u   文件: SamePackingTypeTest.java
public static void main(String[] args) {
    BufferedImageOp op = createTestOp();

    try {
        System.out.print("Integer-based images... ");
        doTest(op, TYPE_INT_ARGB, TYPE_INT_ARGB_PRE);
        System.out.println("done.");

        System.out.print("Byte-based images... ");
        doTest(op, TYPE_4BYTE_ABGR, TYPE_4BYTE_ABGR_PRE);
        System.out.println("done");
    } catch (ImagingOpException e) {
        throw new RuntimeException("Test FAILED", e);
    }
}
 
源代码27 项目: lams   文件: AsyncScalr.java
/**
    * @see Scalr#apply(BufferedImage, BufferedImageOp...)
    */
   public static Future<BufferedImage> apply(final BufferedImage src, final BufferedImageOp... ops)
    throws IllegalArgumentException, ImagingOpException {
checkService();

return service.submit(new Callable<BufferedImage>() {
    public BufferedImage call() throws Exception {
	return Scalr.apply(src, ops);
    }
});
   }
 
源代码28 项目: lams   文件: AsyncScalr.java
/**
    * @see Scalr#crop(BufferedImage, int, int, BufferedImageOp...)
    */
   public static Future<BufferedImage> crop(final BufferedImage src, final int width, final int height,
    final BufferedImageOp... ops) throws IllegalArgumentException, ImagingOpException {
checkService();

return service.submit(new Callable<BufferedImage>() {
    public BufferedImage call() throws Exception {
	return Scalr.crop(src, width, height, ops);
    }
});
   }
 
源代码29 项目: lams   文件: AsyncScalr.java
/**
    * @see Scalr#crop(BufferedImage, int, int, int, int, BufferedImageOp...)
    */
   public static Future<BufferedImage> crop(final BufferedImage src, final int x, final int y, final int width,
    final int height, final BufferedImageOp... ops) throws IllegalArgumentException, ImagingOpException {
checkService();

return service.submit(new Callable<BufferedImage>() {
    public BufferedImage call() throws Exception {
	return Scalr.crop(src, x, y, width, height, ops);
    }
});
   }
 
源代码30 项目: lams   文件: AsyncScalr.java
/**
    * @see Scalr#pad(BufferedImage, int, BufferedImageOp...)
    */
   public static Future<BufferedImage> pad(final BufferedImage src, final int padding, final BufferedImageOp... ops)
    throws IllegalArgumentException, ImagingOpException {
checkService();

return service.submit(new Callable<BufferedImage>() {
    public BufferedImage call() throws Exception {
	return Scalr.pad(src, padding, ops);
    }
});
   }
 
 类所在包
 同包方法