{"action":"reopened","number":1604,"pull_request":{"url":"https://api.github.com/repos/rs/SDWebImage/pulls/1604","id":75197339,"html_url":"https://github.com/rs/SDWebImage/pull/1604","diff_url":"https://github.com/rs/SDWebImage/pull/1604.diff","patch_url":"https://github.com/rs/SDWebImage/pull/1604.patch","issue_url":"https://api.github.com/repos/rs/SDWebImage/issues/1604","number":1604,"state":"open","locked":false,"title":"Enhance transforming image","user":{"login":"kudocc","id":4947330,"avatar_url":"https://avatars.githubusercontent.com/u/4947330?v=3","gravatar_id":"","url":"https://api.github.com/users/kudocc","html_url":"https://github.com/kudocc","followers_url":"https://api.github.com/users/kudocc/followers","following_url":"https://api.github.com/users/kudocc/following{/other_user}","gists_url":"https://api.github.com/users/kudocc/gists{/gist_id}","starred_url":"https://api.github.com/users/kudocc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kudocc/subscriptions","organizations_url":"https://api.github.com/users/kudocc/orgs","repos_url":"https://api.github.com/users/kudocc/repos","events_url":"https://api.github.com/users/kudocc/events{/privacy}","received_events_url":"https://api.github.com/users/kudocc/received_events","type":"User","site_admin":false},"body":"### New Pull Request Checklist\r\n\r\n* [ ] I have read and understood the [CONTRIBUTING guide](https://github.com/rs/SDWebImage/blob/master/.github/CONTRIBUTING.md)\r\n* [x] I have read the [Documentation](http://cocoadocs.org/docsets/SDWebImage/)\r\n* [x] I have searched for a similar pull request in the [project](https://github.com/rs/SDWebImage/pulls) and found none\r\n\r\n* [x] I have updated this branch with the latest master to avoid conflicts (via merge from master or rebase)\r\n* [ ] I have added the required tests to prove the fix/feature I am adding\r\n* [ ] I have updated the documentation (if necesarry)\r\n* [x] I have run the tests and they pass\r\n* [ ] I have run the lint and it passes (`pod lib lint`)\r\n\r\nThis merge request fixes / reffers to the following issues: ...\r\n\r\n### Pull Request Description\r\n\r\n#### Can't apply different transform to the same URL\r\nThe transform method in `SDWebImageManagerDelegate` will transform the image and save the transformed image into the disk for specific URL. Suppose we have two places where use different transform method to the same URL, we can't achieve that perfectly because the first download request will transform the downloaded image and save it into disk, the second request fetch the image from disk, but the image is damaged.\r\n\r\nThe pull request add two parameters to `downloadImageWithURL:...`, they are `transformKey` and `transformBlock`, the transform key is used to identify different ways to transform images (for example: add a 5-point corner radius or shrink image to specific size), the transform block is the method used to apply transforming to image. If you don't want to apply a transform to a image, just use the original interface `downloadImageWithURL:options:progress:completed:`.\r\n\r\nI also modify `SDImageCache.h', ``SDImageCache.m' to support this feature. The disk cache keeps the original image data instead of transformed data, and there is one memory cache for each transform key. Instead of using `memCache`, I create `NSMutableDictionary` whose key is `transformKey` and its value is `AutoPurgeCache`, there is a default memory cache created for non transformed data, its key is \"default\".\r\n","created_at":"2016-06-25T06:14:21Z","updated_at":"2016-06-25T06:42:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fdcc93a599c12c306311f33d4d738ea4f46bd3c7","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/rs/SDWebImage/pulls/1604/commits","review_comments_url":"https://api.github.com/repos/rs/SDWebImage/pulls/1604/comments","review_comment_url":"https://api.github.com/repos/rs/SDWebImage/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rs/SDWebImage/issues/1604/comments","statuses_url":"https://api.github.com/repos/rs/SDWebImage/statuses/0626f11f69e45ed215e94715783e2122e5160a6d","head":{"label":"kudocc:master","ref":"master","sha":"0626f11f69e45ed215e94715783e2122e5160a6d","user":{"login":"kudocc","id":4947330,"avatar_url":"https://avatars.githubusercontent.com/u/4947330?v=3","gravatar_id":"","url":"https://api.github.com/users/kudocc","html_url":"https://github.com/kudocc","followers_url":"https://api.github.com/users/kudocc/followers","following_url":"https://api.github.com/users/kudocc/following{/other_user}","gists_url":"https://api.github.com/users/kudocc/gists{/gist_id}","starred_url":"https://api.github.com/users/kudocc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kudocc/subscriptions","organizations_url":"https://api.github.com/users/kudocc/orgs","repos_url":"https://api.github.com/users/kudocc/repos","events_url":"https://api.github.com/users/kudocc/events{/privacy}","received_events_url":"https://api.github.com/users/kudocc/received_events","type":"User","site_admin":false},"repo":{"id":61871773,"name":"SDWebImage","full_name":"kudocc/SDWebImage","owner":{"login":"kudocc","id":4947330,"avatar_url":"https://avatars.githubusercontent.com/u/4947330?v=3","gravatar_id":"","url":"https://api.github.com/users/kudocc","html_url":"https://github.com/kudocc","followers_url":"https://api.github.com/users/kudocc/followers","following_url":"https://api.github.com/users/kudocc/following{/other_user}","gists_url":"https://api.github.com/users/kudocc/gists{/gist_id}","starred_url":"https://api.github.com/users/kudocc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kudocc/subscriptions","organizations_url":"https://api.github.com/users/kudocc/orgs","repos_url":"https://api.github.com/users/kudocc/repos","events_url":"https://api.github.com/users/kudocc/events{/privacy}","received_events_url":"https://api.github.com/users/kudocc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kudocc/SDWebImage","description":"Asynchronous image downloader with cache support as a UIImageView category","fork":true,"url":"https://api.github.com/repos/kudocc/SDWebImage","forks_url":"https://api.github.com/repos/kudocc/SDWebImage/forks","keys_url":"https://api.github.com/repos/kudocc/SDWebImage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kudocc/SDWebImage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kudocc/SDWebImage/teams","hooks_url":"https://api.github.com/repos/kudocc/SDWebImage/hooks","issue_events_url":"https://api.github.com/repos/kudocc/SDWebImage/issues/events{/number}","events_url":"https://api.github.com/repos/kudocc/SDWebImage/events","assignees_url":"https://api.github.com/repos/kudocc/SDWebImage/assignees{/user}","branches_url":"https://api.github.com/repos/kudocc/SDWebImage/branches{/branch}","tags_url":"https://api.github.com/repos/kudocc/SDWebImage/tags","blobs_url":"https://api.github.com/repos/kudocc/SDWebImage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kudocc/SDWebImage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kudocc/SDWebImage/git/refs{/sha}","trees_url":"https://api.github.com/repos/kudocc/SDWebImage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kudocc/SDWebImage/statuses/{sha}","languages_url":"https://api.github.com/repos/kudocc/SDWebImage/languages","stargazers_url":"https://api.github.com/repos/kudocc/SDWebImage/stargazers","contributors_url":"https://api.github.com/repos/kudocc/SDWebImage/contributors","subscribers_url":"https://api.github.com/repos/kudocc/SDWebImage/subscribers","subscription_url":"https://api.github.com/repos/kudocc/SDWebImage/subscription","commits_url":"https://api.github.com/repos/kudocc/SDWebImage/commits{/sha}","git_commits_url":"https://api.github.com/repos/kudocc/SDWebImage/git/commits{/sha}","comments_url":"https://api.github.com/repos/kudocc/SDWebImage/comments{/number}","issue_comment_url":"https://api.github.com/repos/kudocc/SDWebImage/issues/comments{/number}","contents_url":"https://api.github.com/repos/kudocc/SDWebImage/contents/{+path}","compare_url":"https://api.github.com/repos/kudocc/SDWebImage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kudocc/SDWebImage/merges","archive_url":"https://api.github.com/repos/kudocc/SDWebImage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kudocc/SDWebImage/downloads","issues_url":"https://api.github.com/repos/kudocc/SDWebImage/issues{/number}","pulls_url":"https://api.github.com/repos/kudocc/SDWebImage/pulls{/number}","milestones_url":"https://api.github.com/repos/kudocc/SDWebImage/milestones{/number}","notifications_url":"https://api.github.com/repos/kudocc/SDWebImage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kudocc/SDWebImage/labels{/name}","releases_url":"https://api.github.com/repos/kudocc/SDWebImage/releases{/id}","deployments_url":"https://api.github.com/repos/kudocc/SDWebImage/deployments","created_at":"2016-06-24T09:02:20Z","updated_at":"2016-06-24T09:02:21Z","pushed_at":"2016-06-25T06:39:29Z","git_url":"git://github.com/kudocc/SDWebImage.git","ssh_url":"git@github.com:kudocc/SDWebImage.git","clone_url":"https://github.com/kudocc/SDWebImage.git","svn_url":"https://github.com/kudocc/SDWebImage","homepage":"http://hackemist.com/SDWebImage/doc","size":4756,"stargazers_count":0,"watchers_count":0,"language":"Objective-C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rs:master","ref":"master","sha":"c012fc9bb2e5b1775a8a4a847938352187496a05","user":{"login":"rs","id":68232,"avatar_url":"https://avatars.githubusercontent.com/u/68232?v=3","gravatar_id":"","url":"https://api.github.com/users/rs","html_url":"https://github.com/rs","followers_url":"https://api.github.com/users/rs/followers","following_url":"https://api.github.com/users/rs/following{/other_user}","gists_url":"https://api.github.com/users/rs/gists{/gist_id}","starred_url":"https://api.github.com/users/rs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rs/subscriptions","organizations_url":"https://api.github.com/users/rs/orgs","repos_url":"https://api.github.com/users/rs/repos","events_url":"https://api.github.com/users/rs/events{/privacy}","received_events_url":"https://api.github.com/users/rs/received_events","type":"User","site_admin":false},"repo":{"id":313419,"name":"SDWebImage","full_name":"rs/SDWebImage","owner":{"login":"rs","id":68232,"avatar_url":"https://avatars.githubusercontent.com/u/68232?v=3","gravatar_id":"","url":"https://api.github.com/users/rs","html_url":"https://github.com/rs","followers_url":"https://api.github.com/users/rs/followers","following_url":"https://api.github.com/users/rs/following{/other_user}","gists_url":"https://api.github.com/users/rs/gists{/gist_id}","starred_url":"https://api.github.com/users/rs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rs/subscriptions","organizations_url":"https://api.github.com/users/rs/orgs","repos_url":"https://api.github.com/users/rs/repos","events_url":"https://api.github.com/users/rs/events{/privacy}","received_events_url":"https://api.github.com/users/rs/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rs/SDWebImage","description":"Asynchronous image downloader with cache support as a UIImageView category","fork":false,"url":"https://api.github.com/repos/rs/SDWebImage","forks_url":"https://api.github.com/repos/rs/SDWebImage/forks","keys_url":"https://api.github.com/repos/rs/SDWebImage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rs/SDWebImage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rs/SDWebImage/teams","hooks_url":"https://api.github.com/repos/rs/SDWebImage/hooks","issue_events_url":"https://api.github.com/repos/rs/SDWebImage/issues/events{/number}","events_url":"https://api.github.com/repos/rs/SDWebImage/events","assignees_url":"https://api.github.com/repos/rs/SDWebImage/assignees{/user}","branches_url":"https://api.github.com/repos/rs/SDWebImage/branches{/branch}","tags_url":"https://api.github.com/repos/rs/SDWebImage/tags","blobs_url":"https://api.github.com/repos/rs/SDWebImage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rs/SDWebImage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rs/SDWebImage/git/refs{/sha}","trees_url":"https://api.github.com/repos/rs/SDWebImage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rs/SDWebImage/statuses/{sha}","languages_url":"https://api.github.com/repos/rs/SDWebImage/languages","stargazers_url":"https://api.github.com/repos/rs/SDWebImage/stargazers","contributors_url":"https://api.github.com/repos/rs/SDWebImage/contributors","subscribers_url":"https://api.github.com/repos/rs/SDWebImage/subscribers","subscription_url":"https://api.github.com/repos/rs/SDWebImage/subscription","commits_url":"https://api.github.com/repos/rs/SDWebImage/commits{/sha}","git_commits_url":"https://api.github.com/repos/rs/SDWebImage/git/commits{/sha}","comments_url":"https://api.github.com/repos/rs/SDWebImage/comments{/number}","issue_comment_url":"https://api.github.com/repos/rs/SDWebImage/issues/comments{/number}","contents_url":"https://api.github.com/repos/rs/SDWebImage/contents/{+path}","compare_url":"https://api.github.com/repos/rs/SDWebImage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rs/SDWebImage/merges","archive_url":"https://api.github.com/repos/rs/SDWebImage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rs/SDWebImage/downloads","issues_url":"https://api.github.com/repos/rs/SDWebImage/issues{/number}","pulls_url":"https://api.github.com/repos/rs/SDWebImage/pulls{/number}","milestones_url":"https://api.github.com/repos/rs/SDWebImage/milestones{/number}","notifications_url":"https://api.github.com/repos/rs/SDWebImage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rs/SDWebImage/labels{/name}","releases_url":"https://api.github.com/repos/rs/SDWebImage/releases{/id}","deployments_url":"https://api.github.com/repos/rs/SDWebImage/deployments","created_at":"2009-09-21T17:39:19Z","updated_at":"2016-06-25T02:31:12Z","pushed_at":"2016-06-25T06:39:30Z","git_url":"git://github.com/rs/SDWebImage.git","ssh_url":"git@github.com:rs/SDWebImage.git","clone_url":"https://github.com/rs/SDWebImage.git","svn_url":"https://github.com/rs/SDWebImage","homepage":"http://hackemist.com/SDWebImage/doc","size":6536,"stargazers_count":14801,"watchers_count":14801,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4203,"mirror_url":null,"open_issues_count":142,"forks":4203,"open_issues":142,"watchers":14801,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rs/SDWebImage/pulls/1604"},"html":{"href":"https://github.com/rs/SDWebImage/pull/1604"},"issue":{"href":"https://api.github.com/repos/rs/SDWebImage/issues/1604"},"comments":{"href":"https://api.github.com/repos/rs/SDWebImage/issues/1604/comments"},"review_comments":{"href":"https://api.github.com/repos/rs/SDWebImage/pulls/1604/comments"},"review_comment":{"href":"https://api.github.com/repos/rs/SDWebImage/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rs/SDWebImage/pulls/1604/commits"},"statuses":{"href":"https://api.github.com/repos/rs/SDWebImage/statuses/0626f11f69e45ed215e94715783e2122e5160a6d"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":3,"additions":395,"deletions":48,"changed_files":16}}
{"actor":{"display_login":"kudocc"}}