{"action":"opened","issue":{"url":"https://api.github.com/repos/lionheart/openradar-mirror/issues/10023","repository_url":"https://api.github.com/repos/lionheart/openradar-mirror","labels_url":"https://api.github.com/repos/lionheart/openradar-mirror/issues/10023/labels{/name}","comments_url":"https://api.github.com/repos/lionheart/openradar-mirror/issues/10023/comments","events_url":"https://api.github.com/repos/lionheart/openradar-mirror/issues/10023/events","html_url":"https://github.com/lionheart/openradar-mirror/issues/10023","id":147933049,"number":10023,"title":"21180956: (Photos Framework) No targetSize parameter in requesting requestImageDataForAsset","user":{"login":"openradar-mirror","id":13605213,"avatar_url":"https://avatars.githubusercontent.com/u/13605213?v=3","gravatar_id":"","url":"https://api.github.com/users/openradar-mirror","html_url":"https://github.com/openradar-mirror","followers_url":"https://api.github.com/users/openradar-mirror/followers","following_url":"https://api.github.com/users/openradar-mirror/following{/other_user}","gists_url":"https://api.github.com/users/openradar-mirror/gists{/gist_id}","starred_url":"https://api.github.com/users/openradar-mirror/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openradar-mirror/subscriptions","organizations_url":"https://api.github.com/users/openradar-mirror/orgs","repos_url":"https://api.github.com/users/openradar-mirror/repos","events_url":"https://api.github.com/users/openradar-mirror/events{/privacy}","received_events_url":"https://api.github.com/users/openradar-mirror/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/lionheart/openradar-mirror/labels/reproducible:always","name":"reproducible:always","color":"5319e7"},{"url":"https://api.github.com/repos/lionheart/openradar-mirror/labels/status:unresolved","name":"status:unresolved","color":"444444"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-04-13T03:01:56Z","updated_at":"2016-04-13T03:01:56Z","closed_at":null,"body":"#### Description\n\nSummary:\r\nThis method - (PHImageRequestID)requestImageDataForAsset:(PHAsset *)asset options:(PHImageRequestOptions *)options resultHandler:(void(^)(NSData *imageData, NSString *dataUTI, UIImageOrientation orientation, NSDictionary *info))resultHandler;\r\n\r\ndoes not have a targetSize parameter. This is required when you want the size of the smaller version (2K X 2K) of an image with dimensions let's say 5K X 5K.  In these cases the only option to get the data is by first calling \r\n\r\n- (PHImageRequestID)requestImageForAsset:(PHAsset *)asset targetSize:(CGSize)targetSize contentMode:(PHImageContentMode)contentMode options:(PHImageRequestOptions *)options resultHandler:(void (^)(UIImage *result, NSDictionary *info))resultHandler;\r\n\r\n and then calling UIImageJPEGRepresentation.\r\n\r\nSteps to Reproduce:\r\n1. Request data for a specified size of an asset using - (PHImageRequestID)requestImageDataForAsset:(PHAsset *)asset options:(PHImageRequestOptions *)options resultHandler:(void(^)(NSData *imageData, NSString *dataUTI, UIImageOrientation orientation, NSDictionary *info))resultHandler\r\n2. Find there is no targetSize parameter.\r\n\r\nExpected Results:\r\nExpecting a target size parameter when retrieving data for PHAsset.\r\n\r\nActual Results:\r\nNo target size parameter.\r\n\r\nVersion:\r\niOS 8.3\r\n\r\nNotes:\r\n\r\n\r\nConfiguration:\r\niPhone 5S, 16 GB, Wifi\n\n-\nProduct Version: \nCreated: 2015-06-01T11:09:25.133880\nOriginated: 2015-01-06T00:00:00\nOpen Radar Link: http://www.openradar.me/21180956"}}