losslessness
Added by Doug McC over 5 years ago
Hi, I don't see this covered anywhere, oddly enough.
I want to confirm that exiv2 (and exiftool for that matter, if someone knows) preserves JPEG image data, ie lossless. Obviously it changes the metadata, but is the original image data preserved 100%?
It seems like exiv2 reads and re-writes the entire image file vs. seeking to a location in the on-disk image file and writing over what's there. Is that right?
thanks
Replies (2)
RE: losslessness - Added by Robin Mills over 5 years ago
It is totally lossless. We have to rewrite all the bits in the file, however we perform a binary copy on the image itself. I believe exiftool uses a similar approach.
You can sniff inside the JPG. The command: $ exiv2 -pS image ...
prints the structure of the JPG. The command: $ exiv2 -pR image ...
recursively dumps the image and embedded structures inside the file. The structure of JPG (and TIFF, PNG and some others) is documented on our Wiki. http://dev.exiv2.org/projects/exiv2/wiki/The_Metadata_in_JPEG_files