Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.awt.image.BufferedImage;
import java.awt.image.BufferedImageOp;
import java.awt.image.ConvolveOp;
import java.awt.image.Kernel;

public class Main {
    public static void main(String[] argv) throws Exception {
        BufferedImage bufferedImage = new BufferedImage(200, 200, BufferedImage.TYPE_BYTE_INDEXED);

        Kernel kernel = new Kernel(3, 3, new float[] { -1, -1, -1, -1, 9, -1, -1, -1, -1 });
        BufferedImageOp op = new ConvolveOp(kernel);
        bufferedImage = op.filter(bufferedImage, null);
    }
}