This repository has been archived by the owner on Jun 19, 2024. It is now read-only.
Use original image instead of re-encoding as max quality JPEG #31
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
MediaPicker was using UIImage.AsJPEG() to save the image picked from the camera roll. This re-encodes the image with maximum JPEG quality, resulting in an approximate doubling of the file size and loss of the original EXIF data.
This PR makes an exact copy of the original file from the asset library unless an edited version of the image exists, in which case it still uses UIImage.AsJPEG() since that is the only way to get the edited version of the image data.
I have tested and confirmed that this fix preserves the original file size and EXIF data for unedited images.