PNG metadata read and write
问题 I am using a piece of code posted on stackover flow to write custom metadata to PNG image and read it. The write function seems to work fine but when i try to read data that i had written it throws NullPointerException. Can someone tell me what is wrong? Here is code for writing metadata try{ image=ImageIO.read(new FileInputStream("input.png")); writeCustomData(image, "software", "FRDDC"); ImageIO.write(image, "png", new File("output.png")); } catch(Exception e){ e.printStackTrace(); } Method