{"action":"created","comment":{"url":"https://api.github.com/repos/creativelive/mkimage-server/pulls/comments/118801963","pull_request_review_id":40631759,"id":118801963,"diff_hunk":"@@ -137,6 +138,32 @@ function im_resize(options, force, callback) {\n   var imcmd = sprintf('convert %s -resize \"%sx%s\"%s -quality %d %s', options.src, options.width, options.height, options.adjustment, options.quality, options.dst);\n   exec(imcmd, function(err, stdout, stderr) {\n     if (err) return callback(err);\n+    if(options.overlay === 'play'){\n+      im_add_play_button(options, force, callback);\n+    } else {\n+      im_info(options.dst, force, callback);\n+    }\n+  });\n+}\n+\n+// add play button to an image\n+function im_add_play_button(options, force, callback) {\n+  // make sure we have a proper callback passed\n+  if (typeof callback !== 'function') {\n+    callback = force;\n+    force = false;\n+  }\n+\n+  // if it still not function, make a dummy function of it\n+  if (typeof callback !== 'function') callback = function() {};\n+\n+  if (!options.dst) {\n+    return callback(new Error('dst must not be ommited'));\n+  }\n+\n+  var imcmd = sprintf('composite -gravity center -background none %s %s %s', playButtonPath, options.dst, options.dst);","path":"lib/imagemagick.js","position":37,"original_position":37,"commit_id":"9f350ab956db6219e63c1696c67789ae80a824f4","original_commit_id":"9f350ab956db6219e63c1696c67789ae80a824f4","user":{"login":"nguo","id":2280350,"avatar_url":"https://avatars2.githubusercontent.com/u/2280350?v=3","gravatar_id":"","url":"https://api.github.com/users/nguo","html_url":"https://github.com/nguo","followers_url":"https://api.github.com/users/nguo/followers","following_url":"https://api.github.com/users/nguo/following{/other_user}","gists_url":"https://api.github.com/users/nguo/gists{/gist_id}","starred_url":"https://api.github.com/users/nguo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nguo/subscriptions","organizations_url":"https://api.github.com/users/nguo/orgs","repos_url":"https://api.github.com/users/nguo/repos","events_url":"https://api.github.com/users/nguo/events{/privacy}","received_events_url":"https://api.github.com/users/nguo/received_events","type":"User","site_admin":false},"body":"I don't know the command, but should both the last two args be `options.dst`?","created_at":"2017-05-26T22:50:38Z","updated_at":"2017-05-26T22:53:26Z","html_url":"https://github.com/creativelive/mkimage-server/pull/49#discussion_r118801963","pull_request_url":"https://api.github.com/repos/creativelive/mkimage-server/pulls/49","_links":{"self":{"href":"https://api.github.com/repos/creativelive/mkimage-server/pulls/comments/118801963"},"html":{"href":"https://github.com/creativelive/mkimage-server/pull/49#discussion_r118801963"},"pull_request":{"href":"https://api.github.com/repos/creativelive/mkimage-server/pulls/49"}}},"pull_request":{"url":"https://api.github.com/repos/creativelive/mkimage-server/pulls/49","id":122503977,"html_url":"https://github.com/creativelive/mkimage-server/pull/49","diff_url":"https://github.com/creativelive/mkimage-server/pull/49.diff","patch_url":"https://github.com/creativelive/mkimage-server/pull/49.patch","issue_url":"https://api.github.com/repos/creativelive/mkimage-server/issues/49","number":49,"state":"open","locked":false,"title":"CL-7698 resize requests with the ?overlay=play query param add a play button to the image","user":{"login":"ericbenson","id":8663492,"avatar_url":"https://avatars0.githubusercontent.com/u/8663492?v=3","gravatar_id":"","url":"https://api.github.com/users/ericbenson","html_url":"https://github.com/ericbenson","followers_url":"https://api.github.com/users/ericbenson/followers","following_url":"https://api.github.com/users/ericbenson/following{/other_user}","gists_url":"https://api.github.com/users/ericbenson/gists{/gist_id}","starred_url":"https://api.github.com/users/ericbenson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericbenson/subscriptions","organizations_url":"https://api.github.com/users/ericbenson/orgs","repos_url":"https://api.github.com/users/ericbenson/repos","events_url":"https://api.github.com/users/ericbenson/events{/privacy}","received_events_url":"https://api.github.com/users/ericbenson/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-05-25T19:04:37Z","updated_at":"2017-05-26T22:53:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c0f2d21b54429c0cf8697eacdcf254e7ad03f6ff","assignee":{"login":"ericbenson","id":8663492,"avatar_url":"https://avatars0.githubusercontent.com/u/8663492?v=3","gravatar_id":"","url":"https://api.github.com/users/ericbenson","html_url":"https://github.com/ericbenson","followers_url":"https://api.github.com/users/ericbenson/followers","following_url":"https://api.github.com/users/ericbenson/following{/other_user}","gists_url":"https://api.github.com/users/ericbenson/gists{/gist_id}","starred_url":"https://api.github.com/users/ericbenson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericbenson/subscriptions","organizations_url":"https://api.github.com/users/ericbenson/orgs","repos_url":"https://api.github.com/users/ericbenson/repos","events_url":"https://api.github.com/users/ericbenson/events{/privacy}","received_events_url":"https://api.github.com/users/ericbenson/received_events","type":"User","site_admin":false},"assignees":[{"login":"ericbenson","id":8663492,"avatar_url":"https://avatars0.githubusercontent.com/u/8663492?v=3","gravatar_id":"","url":"https://api.github.com/users/ericbenson","html_url":"https://github.com/ericbenson","followers_url":"https://api.github.com/users/ericbenson/followers","following_url":"https://api.github.com/users/ericbenson/following{/other_user}","gists_url":"https://api.github.com/users/ericbenson/gists{/gist_id}","starred_url":"https://api.github.com/users/ericbenson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericbenson/subscriptions","organizations_url":"https://api.github.com/users/ericbenson/orgs","repos_url":"https://api.github.com/users/ericbenson/repos","events_url":"https://api.github.com/users/ericbenson/events{/privacy}","received_events_url":"https://api.github.com/users/ericbenson/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"tayseph","id":50581,"avatar_url":"https://avatars0.githubusercontent.com/u/50581?v=3","gravatar_id":"","url":"https://api.github.com/users/tayseph","html_url":"https://github.com/tayseph","followers_url":"https://api.github.com/users/tayseph/followers","following_url":"https://api.github.com/users/tayseph/following{/other_user}","gists_url":"https://api.github.com/users/tayseph/gists{/gist_id}","starred_url":"https://api.github.com/users/tayseph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tayseph/subscriptions","organizations_url":"https://api.github.com/users/tayseph/orgs","repos_url":"https://api.github.com/users/tayseph/repos","events_url":"https://api.github.com/users/tayseph/events{/privacy}","received_events_url":"https://api.github.com/users/tayseph/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/creativelive/mkimage-server/pulls/49/commits","review_comments_url":"https://api.github.com/repos/creativelive/mkimage-server/pulls/49/comments","review_comment_url":"https://api.github.com/repos/creativelive/mkimage-server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/creativelive/mkimage-server/issues/49/comments","statuses_url":"https://api.github.com/repos/creativelive/mkimage-server/statuses/9f350ab956db6219e63c1696c67789ae80a824f4","head":{"label":"creativelive:CL-7698","ref":"CL-7698","sha":"9f350ab956db6219e63c1696c67789ae80a824f4","user":{"login":"creativelive","id":3044901,"avatar_url":"https://avatars0.githubusercontent.com/u/3044901?v=3","gravatar_id":"","url":"https://api.github.com/users/creativelive","html_url":"https://github.com/creativelive","followers_url":"https://api.github.com/users/creativelive/followers","following_url":"https://api.github.com/users/creativelive/following{/other_user}","gists_url":"https://api.github.com/users/creativelive/gists{/gist_id}","starred_url":"https://api.github.com/users/creativelive/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/creativelive/subscriptions","organizations_url":"https://api.github.com/users/creativelive/orgs","repos_url":"https://api.github.com/users/creativelive/repos","events_url":"https://api.github.com/users/creativelive/events{/privacy}","received_events_url":"https://api.github.com/users/creativelive/received_events","type":"Organization","site_admin":false},"repo":{"id":15811779,"name":"mkimage-server","full_name":"creativelive/mkimage-server","owner":{"login":"creativelive","id":3044901,"avatar_url":"https://avatars0.githubusercontent.com/u/3044901?v=3","gravatar_id":"","url":"https://api.github.com/users/creativelive","html_url":"https://github.com/creativelive","followers_url":"https://api.github.com/users/creativelive/followers","following_url":"https://api.github.com/users/creativelive/following{/other_user}","gists_url":"https://api.github.com/users/creativelive/gists{/gist_id}","starred_url":"https://api.github.com/users/creativelive/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/creativelive/subscriptions","organizations_url":"https://api.github.com/users/creativelive/orgs","repos_url":"https://api.github.com/users/creativelive/repos","events_url":"https://api.github.com/users/creativelive/events{/privacy}","received_events_url":"https://api.github.com/users/creativelive/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/creativelive/mkimage-server","description":"On-demand image resize server based on 'express'","fork":true,"url":"https://api.github.com/repos/creativelive/mkimage-server","forks_url":"https://api.github.com/repos/creativelive/mkimage-server/forks","keys_url":"https://api.github.com/repos/creativelive/mkimage-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/creativelive/mkimage-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/creativelive/mkimage-server/teams","hooks_url":"https://api.github.com/repos/creativelive/mkimage-server/hooks","issue_events_url":"https://api.github.com/repos/creativelive/mkimage-server/issues/events{/number}","events_url":"https://api.github.com/repos/creativelive/mkimage-server/events","assignees_url":"https://api.github.com/repos/creativelive/mkimage-server/assignees{/user}","branches_url":"https://api.github.com/repos/creativelive/mkimage-server/branches{/branch}","tags_url":"https://api.github.com/repos/creativelive/mkimage-server/tags","blobs_url":"https://api.github.com/repos/creativelive/mkimage-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/creativelive/mkimage-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/creativelive/mkimage-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/creativelive/mkimage-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/creativelive/mkimage-server/statuses/{sha}","languages_url":"https://api.github.com/repos/creativelive/mkimage-server/languages","stargazers_url":"https://api.github.com/repos/creativelive/mkimage-server/stargazers","contributors_url":"https://api.github.com/repos/creativelive/mkimage-server/contributors","subscribers_url":"https://api.github.com/repos/creativelive/mkimage-server/subscribers","subscription_url":"https://api.github.com/repos/creativelive/mkimage-server/subscription","commits_url":"https://api.github.com/repos/creativelive/mkimage-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/creativelive/mkimage-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/creativelive/mkimage-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/creativelive/mkimage-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/creativelive/mkimage-server/contents/{+path}","compare_url":"https://api.github.com/repos/creativelive/mkimage-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/creativelive/mkimage-server/merges","archive_url":"https://api.github.com/repos/creativelive/mkimage-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/creativelive/mkimage-server/downloads","issues_url":"https://api.github.com/repos/creativelive/mkimage-server/issues{/number}","pulls_url":"https://api.github.com/repos/creativelive/mkimage-server/pulls{/number}","milestones_url":"https://api.github.com/repos/creativelive/mkimage-server/milestones{/number}","notifications_url":"https://api.github.com/repos/creativelive/mkimage-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/creativelive/mkimage-server/labels{/name}","releases_url":"https://api.github.com/repos/creativelive/mkimage-server/releases{/id}","deployments_url":"https://api.github.com/repos/creativelive/mkimage-server/deployments","created_at":"2014-01-10T22:30:53Z","updated_at":"2015-02-18T08:15:22Z","pushed_at":"2017-05-25T22:02:08Z","git_url":"git://github.com/creativelive/mkimage-server.git","ssh_url":"git@github.com:creativelive/mkimage-server.git","clone_url":"https://github.com/creativelive/mkimage-server.git","svn_url":"https://github.com/creativelive/mkimage-server","homepage":"","size":122,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":2,"forks":9,"open_issues":2,"watchers":1,"default_branch":"master"}},"base":{"label":"creativelive:master","ref":"master","sha":"eeb3850bf88a2b8cdff0c541c27ef4631325e569","user":{"login":"creativelive","id":3044901,"avatar_url":"https://avatars0.githubusercontent.com/u/3044901?v=3","gravatar_id":"","url":"https://api.github.com/users/creativelive","html_url":"https://github.com/creativelive","followers_url":"https://api.github.com/users/creativelive/followers","following_url":"https://api.github.com/users/creativelive/following{/other_user}","gists_url":"https://api.github.com/users/creativelive/gists{/gist_id}","starred_url":"https://api.github.com/users/creativelive/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/creativelive/subscriptions","organizations_url":"https://api.github.com/users/creativelive/orgs","repos_url":"https://api.github.com/users/creativelive/repos","events_url":"https://api.github.com/users/creativelive/events{/privacy}","received_events_url":"https://api.github.com/users/creativelive/received_events","type":"Organization","site_admin":false},"repo":{"id":15811779,"name":"mkimage-server","full_name":"creativelive/mkimage-server","owner":{"login":"creativelive","id":3044901,"avatar_url":"https://avatars0.githubusercontent.com/u/3044901?v=3","gravatar_id":"","url":"https://api.github.com/users/creativelive","html_url":"https://github.com/creativelive","followers_url":"https://api.github.com/users/creativelive/followers","following_url":"https://api.github.com/users/creativelive/following{/other_user}","gists_url":"https://api.github.com/users/creativelive/gists{/gist_id}","starred_url":"https://api.github.com/users/creativelive/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/creativelive/subscriptions","organizations_url":"https://api.github.com/users/creativelive/orgs","repos_url":"https://api.github.com/users/creativelive/repos","events_url":"https://api.github.com/users/creativelive/events{/privacy}","received_events_url":"https://api.github.com/users/creativelive/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/creativelive/mkimage-server","description":"On-demand image resize server based on 'express'","fork":true,"url":"https://api.github.com/repos/creativelive/mkimage-server","forks_url":"https://api.github.com/repos/creativelive/mkimage-server/forks","keys_url":"https://api.github.com/repos/creativelive/mkimage-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/creativelive/mkimage-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/creativelive/mkimage-server/teams","hooks_url":"https://api.github.com/repos/creativelive/mkimage-server/hooks","issue_events_url":"https://api.github.com/repos/creativelive/mkimage-server/issues/events{/number}","events_url":"https://api.github.com/repos/creativelive/mkimage-server/events","assignees_url":"https://api.github.com/repos/creativelive/mkimage-server/assignees{/user}","branches_url":"https://api.github.com/repos/creativelive/mkimage-server/branches{/branch}","tags_url":"https://api.github.com/repos/creativelive/mkimage-server/tags","blobs_url":"https://api.github.com/repos/creativelive/mkimage-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/creativelive/mkimage-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/creativelive/mkimage-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/creativelive/mkimage-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/creativelive/mkimage-server/statuses/{sha}","languages_url":"https://api.github.com/repos/creativelive/mkimage-server/languages","stargazers_url":"https://api.github.com/repos/creativelive/mkimage-server/stargazers","contributors_url":"https://api.github.com/repos/creativelive/mkimage-server/contributors","subscribers_url":"https://api.github.com/repos/creativelive/mkimage-server/subscribers","subscription_url":"https://api.github.com/repos/creativelive/mkimage-server/subscription","commits_url":"https://api.github.com/repos/creativelive/mkimage-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/creativelive/mkimage-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/creativelive/mkimage-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/creativelive/mkimage-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/creativelive/mkimage-server/contents/{+path}","compare_url":"https://api.github.com/repos/creativelive/mkimage-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/creativelive/mkimage-server/merges","archive_url":"https://api.github.com/repos/creativelive/mkimage-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/creativelive/mkimage-server/downloads","issues_url":"https://api.github.com/repos/creativelive/mkimage-server/issues{/number}","pulls_url":"https://api.github.com/repos/creativelive/mkimage-server/pulls{/number}","milestones_url":"https://api.github.com/repos/creativelive/mkimage-server/milestones{/number}","notifications_url":"https://api.github.com/repos/creativelive/mkimage-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/creativelive/mkimage-server/labels{/name}","releases_url":"https://api.github.com/repos/creativelive/mkimage-server/releases{/id}","deployments_url":"https://api.github.com/repos/creativelive/mkimage-server/deployments","created_at":"2014-01-10T22:30:53Z","updated_at":"2015-02-18T08:15:22Z","pushed_at":"2017-05-25T22:02:08Z","git_url":"git://github.com/creativelive/mkimage-server.git","ssh_url":"git@github.com:creativelive/mkimage-server.git","clone_url":"https://github.com/creativelive/mkimage-server.git","svn_url":"https://github.com/creativelive/mkimage-server","homepage":"","size":122,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":2,"forks":9,"open_issues":2,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/creativelive/mkimage-server/pulls/49"},"html":{"href":"https://github.com/creativelive/mkimage-server/pull/49"},"issue":{"href":"https://api.github.com/repos/creativelive/mkimage-server/issues/49"},"comments":{"href":"https://api.github.com/repos/creativelive/mkimage-server/issues/49/comments"},"review_comments":{"href":"https://api.github.com/repos/creativelive/mkimage-server/pulls/49/comments"},"review_comment":{"href":"https://api.github.com/repos/creativelive/mkimage-server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/creativelive/mkimage-server/pulls/49/commits"},"statuses":{"href":"https://api.github.com/repos/creativelive/mkimage-server/statuses/9f350ab956db6219e63c1696c67789ae80a824f4"}}}}
{"actor":{"display_login":"nguo"}}