Unexpected file size increase adding EXIF data #1696
-
Hi there, I am looking to use your library to add EXIF data to already compressed photos. I did couple of simple tests:
Results for test 1 and 2 are the same:
While I can understand that adding some info to a file will increase its size, the increase is not proportional with the data added and even if no data added the size increases. Now I am in doubt if you use your library or not. How do you explain that? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
The ImageSharp pipeline is thus:
As you will see from our processing pipeline the output data can easily end up with much at a different size even if you think you have done nothing to it. Just loading it creates a completely different data shape and data size than the encoded original, then we have the encode it again, but this time with a different encoder library with different settings than where was used when generating the source image. So in conclusion if you are hoping to use us for just manipulating EXIF data in jpegs without reencoding the pixel data then we probably are not the right choice. For resizing we might be, you just have to be conscious of the default quality settings (or equivalent, as 'quality' is really a JPEG only thing) of our various encoders and tune them until you are happy with the size/vs quality you end up with. https://docs.sixlabors.com/articles/imagesharp/imageformats.html might be a good place to start looking for our various Formats |
Beta Was this translation helpful? Give feedback.
-
100% size increase (even 13% one) is not normal, can you provide test images before and after the conversion via ImageSharp? |
Beta Was this translation helpful? Give feedback.
The ImageSharp pipeline is thus:
Image.Load
image.Save()