{"action":"created","issue":{"url":"https://api.github.com/repos/r-lyeh/spot/issues/2","labels_url":"https://api.github.com/repos/r-lyeh/spot/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/r-lyeh/spot/issues/2/comments","events_url":"https://api.github.com/repos/r-lyeh/spot/issues/2/events","html_url":"https://github.com/r-lyeh/spot/issues/2","id":43307778,"number":2,"title":"consider these","user":{"login":"r-lyeh","id":878187,"avatar_url":"https://avatars.githubusercontent.com/u/878187?v=3","gravatar_id":"","url":"https://api.github.com/users/r-lyeh","html_url":"https://github.com/r-lyeh","followers_url":"https://api.github.com/users/r-lyeh/followers","following_url":"https://api.github.com/users/r-lyeh/following{/other_user}","gists_url":"https://api.github.com/users/r-lyeh/gists{/gist_id}","starred_url":"https://api.github.com/users/r-lyeh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/r-lyeh/subscriptions","organizations_url":"https://api.github.com/users/r-lyeh/orgs","repos_url":"https://api.github.com/users/r-lyeh/repos","events_url":"https://api.github.com/users/r-lyeh/events{/privacy}","received_events_url":"https://api.github.com/users/r-lyeh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2014-09-20T10:58:59Z","updated_at":"2015-02-13T09:06:47Z","closed_at":null,"body":"```\r\nPhotoshop-style blend equations with destination alpha\r\n\r\nThe photoshop blend formulas are available in many places on the web, but\r\nthey all assume an opaque output target. Sometimes the output target is not\r\nopaque (for example, with layer folders in Photoshop and the blend mode\r\nnot set to \"normal\").\r\n\r\nThe following formulas appear to be the ones used by Adobe Flash Player;\r\nthey might differ from Photoshop blend modes, and they do not include all of\r\nthe Photoshop blend modes (these formulas were developed for and verified in\r\nIggy, software I wrote for RAD Game Tools which \"plays\" Adobe Flash files).\r\n\r\n                   out color                                                    out alpha\r\n                   --------------                                               -----------\r\nlayer/over:    (   sc+(1-sa)*dc                                              ,  sa+da-sa*da   )\r\nmultiply:      (   sc*dc                                                     ,  sa+da-sa*da   )\r\nscreen:        (   sa*da - (da-dc)*(sa-sc)                                   ,  sa+da-sa*da   )\r\nlighten:       (   max(sa*dc,sc*da)                                          ,  sa+da-sa*da   )\r\ndarken:        (   min(sa*dc,sc*da)                                          ,  sa+da-sa*da   )\r\nadd:           (   min(dc+sc,1)                                              ,  min(sa+da,1)  )\r\nsubtract:      (   max(dc-sc,0)                                              ,  min(sa+da,1)  )\r\ndifference:    (   abs(sa*dc-sc*da)                                          ,  sa+da-sa*da   )\r\ninvert:        (   sa*(da-dc)                                                ,  sa+da-sa*da   )\r\noverlay:       (   dc < da/2.0 ? (2.0*sc*dc) : (sa*da - 2.0*(da-dc)*(sa-sc)) ,  sa+da-sa*da   )\r\nhardlight:     (   sc < sa/2.0 ? (2.0*sc*dc) : (sa*da - 2.0*(da-dc)*(sa-sc)) ,  sa+da-sa*da   )\r\n\r\n  sc = source color, sa = source alpha, dc = dest color, da = dest alpha\r\n\r\nThe inputs in the above equations must be premultiplied. If inputs are\r\nnon-premultiplied, replace \"sc\" with \"sc*sa\". (Outputs are always\r\npremultiplied, hence destination is always premultiplied.)\r\n\r\n-- Sean Barrett, 2012/09/19\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/r-lyeh/spot/issues/comments/74224269","html_url":"https://github.com/r-lyeh/spot/issues/2#issuecomment-74224269","issue_url":"https://api.github.com/repos/r-lyeh/spot/issues/2","id":74224269,"user":{"login":"r-lyeh","id":878187,"avatar_url":"https://avatars.githubusercontent.com/u/878187?v=3","gravatar_id":"","url":"https://api.github.com/users/r-lyeh","html_url":"https://github.com/r-lyeh","followers_url":"https://api.github.com/users/r-lyeh/followers","following_url":"https://api.github.com/users/r-lyeh/following{/other_user}","gists_url":"https://api.github.com/users/r-lyeh/gists{/gist_id}","starred_url":"https://api.github.com/users/r-lyeh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/r-lyeh/subscriptions","organizations_url":"https://api.github.com/users/r-lyeh/orgs","repos_url":"https://api.github.com/users/r-lyeh/repos","events_url":"https://api.github.com/users/r-lyeh/events{/privacy}","received_events_url":"https://api.github.com/users/r-lyeh/received_events","type":"User","site_admin":false},"created_at":"2015-02-13T09:06:47Z","updated_at":"2015-02-13T09:06:47Z","body":"https://github.com/pornel/pngquant"}}