Manipulate an image without deleting its EXIF data
问题 Using imageIO, I usually have the problem of transforming an image file, and after overwriting it, it loses all of its EXIF data. Is there any way to preserve it without first extracting it, caching it, and then resetting it? 回答1: ImageIO do have this functionality itself, but instead of ImageIO.read you will need to use ImageReader: ImageReader reader = ImageIO.getImageReadersBySuffix("jpg").next(); (you may want to also check if such reader exists). Then you need to set the input: reader