Write JPEG with Exif-Data
I'm relative new to JAI and ImageIO. The last days I tryed hard to find a solution for reading and writing exif-tags from JPEGs.
I achieved the reading using the following reader:
and then use imageio-tiff-format to get the tags. I even managed to change the value of an tag by creating a new one and replace the current. The problem occurs when trying to write the image back to disk: then all the exif-data is lost.
I achieved as well to read the JPEG with the reader
and write it back to disk with the appropriate writer right away as is.
But with this Reader I can not use the tiff-format, so I can not read out exif-tags not to mention changing them.
I actually tried to read with the com.sun.media...-reader and pass the metadata-object to an com.sun.imageio....-writer, but this way the exif-data is getting lost as well.
Searching this forum I found the following bugreport:
Thought maybe this ist the reason for the com.sun.media...-writer to not write Metadata, but this bug was fixed in 1.1beta and I'm using the current (1.1-stable) release.
Now I don't have any more idea - can please someone help me? If there would be a completely other way to read and write exif-data I would appreciate that, too.
Below you can find my current sourcecode.
Thanks for reading and trying to help,
Message was edited by: blackfox86