java类java.awt.image.BufferedImageOp的实例源码

AsyncScalr.java 文件源码 项目:lams 阅读 24 收藏 0 点赞 0 评论 0
/**
    * @see Scalr#resize(BufferedImage, Mode, int, BufferedImageOp...)
    */
   public static Future<BufferedImage> resize(final BufferedImage src, 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, resizeMode, targetSize, ops);
    }
});
   }
AsyncScalr.java 文件源码 项目:lams 阅读 23 收藏 0 点赞 0 评论 0
/**
    * @see Scalr#resize(BufferedImage, Method, int, int, BufferedImageOp...)
    */
   public static Future<BufferedImage> resize(final BufferedImage src, final Method scalingMethod,
    final int targetWidth, final int targetHeight, final BufferedImageOp... ops) {
checkService();

return service.submit(new Callable<BufferedImage>() {
    public BufferedImage call() throws Exception {
    return Scalr.resize(src, scalingMethod, targetWidth, targetHeight, ops);
    }
});
   }
AsyncScalr.java 文件源码 项目:lams 阅读 25 收藏 0 点赞 0 评论 0
/**
    * @see Scalr#resize(BufferedImage, Mode, int, int, BufferedImageOp...)
    */
   public static Future<BufferedImage> resize(final BufferedImage src, 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, resizeMode, targetWidth, targetHeight, ops);
    }
});
   }
AsyncScalr.java 文件源码 项目:lams 阅读 26 收藏 0 点赞 0 评论 0
/**
    * @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);
    }
});
   }
AsyncScalr.java 文件源码 项目:lams 阅读 23 收藏 0 点赞 0 评论 0
/**
    * @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);
    }
});
   }
BufferedBufImgOps.java 文件源码 项目:OpenJSharp 阅读 24 收藏 0 点赞 0 评论 0
public static void enableBufImgOp(RenderQueue rq, SurfaceData srcData,
                                  BufferedImage srcImg,
                                  BufferedImageOp biop)
{
    if (biop instanceof ConvolveOp) {
        enableConvolveOp(rq, srcData, (ConvolveOp)biop);
    } else if (biop instanceof RescaleOp) {
        enableRescaleOp(rq, srcData, srcImg, (RescaleOp)biop);
    } else if (biop instanceof LookupOp) {
        enableLookupOp(rq, srcData, srcImg, (LookupOp)biop);
    } else {
        throw new InternalError("Unknown BufferedImageOp");
    }
}
BufferedBufImgOps.java 文件源码 项目:OpenJSharp 阅读 22 收藏 0 点赞 0 评论 0
public static void disableBufImgOp(RenderQueue rq, BufferedImageOp biop) {
    if (biop instanceof ConvolveOp) {
        disableConvolveOp(rq);
    } else if (biop instanceof RescaleOp) {
        disableRescaleOp(rq);
    } else if (biop instanceof LookupOp) {
        disableLookupOp(rq);
    } else {
        throw new InternalError("Unknown BufferedImageOp");
    }
}
MlibOpsTest.java 文件源码 项目:openjdk-jdk10 阅读 24 收藏 0 点赞 0 评论 0
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);
}
MlibOpsTest.java 文件源码 项目:openjdk-jdk10 阅读 36 收藏 0 点赞 0 评论 0
private static BufferedImageOp getConvolveOp() {
    int kw = 3;
    int kh = 3;
    int size = kw * kh;
    float[] kdata = new float[size];
    Arrays.fill(kdata, 1.0f / size);

    Kernel k  = new Kernel(kw, kh, kdata);
    return new ConvolveOp(k);
}
BufferedBufImgOps.java 文件源码 项目:jdk8u-jdk 阅读 21 收藏 0 点赞 0 评论 0
public static void enableBufImgOp(RenderQueue rq, SurfaceData srcData,
                                  BufferedImage srcImg,
                                  BufferedImageOp biop)
{
    if (biop instanceof ConvolveOp) {
        enableConvolveOp(rq, srcData, (ConvolveOp)biop);
    } else if (biop instanceof RescaleOp) {
        enableRescaleOp(rq, srcData, srcImg, (RescaleOp)biop);
    } else if (biop instanceof LookupOp) {
        enableLookupOp(rq, srcData, srcImg, (LookupOp)biop);
    } else {
        throw new InternalError("Unknown BufferedImageOp");
    }
}


问题


面经


文章

微信
公众号

扫码关注公众号