Embossing a Buffered Image - Java 2D Graphics

Java examples for 2D Graphics:BufferedImage Effect

Description

Embossing a Buffered Image

Demo Code

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[] args) throws Exception {
    Kernel kernel = new Kernel(3, 3, new float[] { -2, 0, 0, 0, 1, 0, 0, 0, 2 });
    BufferedImageOp op = new ConvolveOp(kernel);
    /* w  ww.jav  a  2  s .co m*/
    BufferedImage bufferedImage = null;
    bufferedImage = op.filter(bufferedImage, null);
  }
}

Related Tutorials