// ImageOpTests constructor above, so the following is safe...
ictx.bufSrc = (BufferedImage)ictx.src;
String op = (String)env.getModifier(opList);
if (op.startsWith("convolve")) {
Kernel kernel;
if (op.startsWith("convolve3x3")) {
// 3x3 blur
float[] data = {
0.1f, 0.1f, 0.1f,
0.1f, 0.2f, 0.1f,
0.1f, 0.1f, 0.1f,
};
kernel = new Kernel(3, 3, data);
} else { // (op.startsWith("convolve5x5"))
// 5x5 edge
float[] data = {
-1.0f, -1.0f, -1.0f, -1.0f, -1.0f,
-1.0f, -1.0f, -1.0f, -1.0f, -1.0f,
-1.0f, -1.0f, 24.0f, -1.0f, -1.0f,
-1.0f, -1.0f, -1.0f, -1.0f, -1.0f,
-1.0f, -1.0f, -1.0f, -1.0f, -1.0f,
};
kernel = new Kernel(5, 5, data);
}
int edge = op.endsWith("zero") ?
ConvolveOp.EDGE_ZERO_FILL : ConvolveOp.EDGE_NO_OP;
ictx.bufImgOp = new ConvolveOp(kernel, edge, null);
} else if (op.startsWith("lookup")) {