• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java ImagingOpException类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中java.awt.image.ImagingOpException的典型用法代码示例。如果您正苦于以下问题:Java ImagingOpException类的具体用法?Java ImagingOpException怎么用?Java ImagingOpException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ImagingOpException类属于java.awt.image包,在下文中一共展示了ImagingOpException类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: resize

import java.awt.image.ImagingOpException; //导入依赖的package包/类
/**
    * @see Scalr#resize(BufferedImage, int, int, BufferedImageOp...)
    */
   public static Future<BufferedImage> resize(final BufferedImage src, 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, targetWidth, targetHeight, ops);
    }
});
   }
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:14,代码来源:AsyncScalr.java


示例2: crashTest

import java.awt.image.ImagingOpException; //导入依赖的package包/类
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.");
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:19,代码来源:EdgeNoOpCrash.java


示例3: doTest

import java.awt.image.ImagingOpException; //导入依赖的package包/类
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.");
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:23,代码来源:OpCompatibleImageTest.java


示例4: apply

import java.awt.image.ImagingOpException; //导入依赖的package包/类
/**
    * @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);
    }
});
   }
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:14,代码来源:AsyncScalr.java


示例5: crop

import java.awt.image.ImagingOpException; //导入依赖的package包/类
/**
    * @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);
    }
});
   }
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:14,代码来源:AsyncScalr.java


示例6: pad

import java.awt.image.ImagingOpException; //导入依赖的package包/类
/**
    * @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);
    }
});
   }
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:14,代码来源:AsyncScalr.java


示例7: rotate

import java.awt.image.ImagingOpException; //导入依赖的package包/类
/**
    * @see Scalr#rotate(BufferedImage, Rotation, BufferedImageOp...)
    */
   public static Future<BufferedImage> rotate(final BufferedImage src, final Rotation rotation,
    final BufferedImageOp... ops) throws IllegalArgumentException, ImagingOpException {
checkService();

return service.submit(new Callable<BufferedImage>() {
    public BufferedImage call() throws Exception {
	return Scalr.rotate(src, rotation, ops);
    }
});
   }
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:14,代码来源:AsyncScalr.java


示例8: main

import java.awt.image.ImagingOpException; //导入依赖的package包/类
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);
    }
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:16,代码来源:SamePackingTypeTest.java



注:本文中的java.awt.image.ImagingOpException类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Contents类代码示例发布时间:2022-05-21
下一篇:
Java GuiMerchant类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap