import java.awt.*;
import java.awt.image.*;
import java.io.*;
import javax.imageio.*;
import com.jhlabs.composite.*;
import com.jhlabs.image.*;
public class Java2DTest77
{
public static void main(String args[])
throws Exception
{
/* 織物風に変換 */
BufferedImage img = ImageIO.read(new File("sf.jpg"));
BufferedImage imga = new BufferedImage(
img.getWidth(), img.getHeight(),
BufferedImage.TYPE_INT_ARGB
);
WeaveFilter wf = new WeaveFilter();
img = wf.filter(img, imga);
ImageIO.write(img, "png", new File("sample1978a.png"));
}
}
元画像(sf.jpg)
出力画像(sample1978a.png)
関連項目
Jerry Huxtableさんのホームページ
http://www.jhlabs.com/index.html
Java Image Filtersのページ
http://www.jhlabs.com/ip/filters/
java.net でのプロジェクトページ
https://pixels.dev.java.net/
No comments:
Post a Comment