How do I convert a TIF to PNG in Java?
问题 Under Java what is the best way to go about converting an TIF file to a PNG? Simplicity is preferable, but if the simplest way is to use a third party library then I would consider that solution. 回答1: First, install JAI. Then install JAI/ImageIO. Then do public static void main(final String[] args) throws Exception { final BufferedImage tif = ImageIO.read(new File("test.tif")); ImageIO.write(tif, "png", new File("test.png")); } 回答2: Use imageMagic java libraries like im4java, their