import groovy.swing.j2d.*
def gr = new GraphicsRenderer()
gr.renderToFile("sample830a.png", 300, 225){
 antialias("on")
 rect( x: 0, y: 0, width: 300, height: 225,
   borderColor: no){
   texturePaint(x: 0, y: 0, file: 'sf2.jpg' )
   filters {
     glow(amount: 0.3)
   }
 }
}
元画像(sf2.jpg)

出力画像(sample830a.png)

動作環境
Groovy1.6.0 Beta2, JDK1.6 Update11
関連項目
Java2DとJava Image Filters(pixels)を使用して画像にグローフィルタをかける
 
No comments:
Post a Comment