GroovyでJDeliを実行する
このチュートリアルでは、GroovyでJDeliを使用する方法を説明します。
このコードスニペットでは、JPGからPNGへの変換を例として使用しています。この例では、ビルドツールとしてMaven を使用しています。
import com.idrsolutions.image.JDeli
import java.awt.image.BufferedImage
static void main(String[] args) {
BufferedImage bufferedImage = JDeli.read(new File("jpgFile.jpg"))
JDeli.write(bufferedImage, "png", new File("pngFile.png"))
}
