Full-file photo content differs between ALAsset and PHAsset
| Originator: | stephenpoletto | ||
| Number: | rdar://18311330 | Date Originated: | 11-Sep-2014 02:28 PM |
| Status: | Open | Resolved: | |
| Product: | iOS SDK | Product Version: | 8.0 (12A365) |
| Classification: | Other Bug | Reproducible: | Always |
Summary: Fetching the full-file contents of a photo on the device will yield different results depending on if you use the AssetsLibrary API or the PhotoKit API. What’s different? The end of the file. When using PhotoKit, photos are padded with a series of null bytes at the end: http://spolet.to/image/1B2A0q291I1A Sample files: https://www.dropbox.com/sh/xceibtsl5yxcfya/AABzwMoNN8qSdS5dMUdNXaJHa?dl=0 Sample project: https://www.dropbox.com/sh/s3y52t2p3ptfuoa/AAD8sNz68u_086kkG7tdy9cga?dl=0 Steps to Reproduce: * All steps completed using Xcode 6.0 (6A313). * Ensure the device has recently taken photos in the camera roll. 1) Open the provided SPPhotoLibraryData.xcodeproj and set ‘usePhotoKit’ to NO. 2) Run the SPPhotoLibraryData application on the device. It will find the latest photo in the camera roll and write out the full file contents to the application bundle. 3) In Xcode, open Devices->Installed Apps. Download the SPPhotoLibraryData container. Browse to /AppData/Library/Caches/ and find the exported image. 4) Set the ‘usePhotoKit’ flag to YES. 5) Repeat steps (2) & (3). Expected Results: The exported images should have identical file contents. Actual Results: The exported images differ. Version: 8.0 (12A365) Notes: Configuration: iPhone 5S Attachments: 'SPPhotoLibraryData.zip' was successfully uploaded.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!