In iOS13 PHImageManager.requestImageForAsset is unreliable for requesting the original image size. This is especially true when Optimize Storage is turned on with iCloud photo backup.
iOS13 added PHImageManger.requestImageDataAndOrientationForAsset and according to the docs this is the desired way to request the data of the original image.
This pull request detects if requestImageDataAndOrientationForAsset is available and uses it, otherwise it falls back to requestImageForAsset for older iOS versions.
In iOS13 PHImageManager.requestImageForAsset is unreliable for requesting the original image size. This is especially true when Optimize Storage is turned on with iCloud photo backup.
iOS13 added PHImageManger.requestImageDataAndOrientationForAsset and according to the docs this is the desired way to request the data of the original image.
This pull request detects if requestImageDataAndOrientationForAsset is available and uses it, otherwise it falls back to requestImageForAsset for older iOS versions.
Fixes #107