Importing and exporting images and changing EXIF parameters

Why Mathematica modifies imported images on exporting them?

Example:

Import["C:\\image1.jpg"];
Export["C:\\image2.jpg",%]


and now files image1.jpg and image2.jpg are not identical.

What is a purpose of this? The user did not have made any manipulation to the image, so why the exact same file was not created?

Say I want to change orientation of an image by changing "orientation" parameter in EXIF. The output of exporting such an image should be file with the same size as the original image and the two images should differ only in one byte - byte that encodes EXIF orientation.

• Import and Export are not useful for what you want to do. Check the BinaryRead and BinaryWrite low-level file operations, and Binary Files documentation. – creidhne Oct 29 '17 at 21:04