Greegko / google-metadata-matcher

Google Photos takeout metadata merger
105 stars 10 forks source link

Why does the file size increase? #3

Open aciccarello opened 1 year ago

aciccarello commented 1 year ago

I'm seeing a significant increase in the file size when not using the optimize flag. In the below example, the file jumped from 246K to 976K. Why is the file so much larger?

$ls -lhd Takeout/Google\ Photos/Photos\ from\ 2009/IMG_7415*
-rwxrwxrwx+ 1 aciccarello users 246K Feb 22 07:37 'Takeout/Google Photos/Photos from 2009/IMG_7415.JPG'
-rwxrwxrwx+ 1 aciccarello users  915 Feb 22 07:37 'Takeout/Google Photos/Photos from 2009/IMG_7415.JPG.json'
$ ls -lhd Photos/Photos\ from\ 2009/IMG_7415*
-rwxrwxrwx+ 1 aciccarello users 976K Jul 19  2009 'Photos/Photos from 2009/IMG_7415.jpg'
Greegko commented 1 year ago

I notice the file size increase from HEIC to JPEG mostly, didn't really check for the others. The core was another script, definilty this should be reviewed how the optimalization is taking place and when. And possibly we even could not transform everyone into jpeg.

aciccarello commented 1 year ago

I'd love to see an option to only modify the exif data. I'm guessing that would mean skipping Pillow altogether in that case.

https://stackoverflow.com/questions/53543549/change-exif-data-on-jpeg-without-altering-picture