I want to modify the metadata of some types of images (png, jpeg or gif) and I found a a code that works very well for PNG images on this topic, provided by haraldK. When I try to run it on a jpg image though, it throws this error :
javax.imageio.IIOException: JFIF APP0 must be first marker after SOI. The error is thrown when arriving on the line IIOImage image = reader.readAll(0, null);
What can I do to get this working ?
Thanks in advance for your answer.