Java awt生成图片消除锯齿

java-awt生成图片消除锯齿

1
2
3
4
5
6
7
8
//抗锯齿
Graphics2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
//g.drawImage(image, x, y, w,h, null);

//利用iamge.getScaledInstance API
g.drawImage(image.getScaledInstance(w,h),BufferedImage.SCALE_SMOOTH),x,y,null);

ImageIO.write(big,formateName, file);

Java awt生成图片消除锯齿
http://yoursite.com/post/da05d629.html/
Author
Chase Wang
Posted on
December 18, 2017
Licensed under