 <p>Try this all the best..</p> <pre><code>import javax.media.jai.*; public class jai_png_jpg { public static void main(String[] args)throws Exception { String filename="input_png.png"; //Read input PNG as a PlanarImage file PlanarImage inputfile = JAI.create("fileload", filename); //write output in JPG Format JAI.create("filestore",inputfile,"jai_jpg_output.jpg","JPEG"); } } </code></pre>