use of java.awt.image.ConvolveOp in project jdk8u_jdk by JetBrains.
the class EdgeNoOpCrash method crashTest.
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.");
}
use of java.awt.image.ConvolveOp in project jdk8u_jdk by JetBrains.
the class MlibOpsTest method getConvolveOp.
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);
}
Aggregations