{"action":"created","issue":{"url":"https://api.github.com/repos/BloomBooks/BloomDesktop/issues/2387","repository_url":"https://api.github.com/repos/BloomBooks/BloomDesktop","labels_url":"https://api.github.com/repos/BloomBooks/BloomDesktop/issues/2387/labels{/name}","comments_url":"https://api.github.com/repos/BloomBooks/BloomDesktop/issues/2387/comments","events_url":"https://api.github.com/repos/BloomBooks/BloomDesktop/issues/2387/events","html_url":"https://github.com/BloomBooks/BloomDesktop/pull/2387","id":321742933,"number":2387,"title":"Reduce images when creating epubs (BL-4731)","user":{"login":"StephenMcConnel","id":2228246,"avatar_url":"https://avatars3.githubusercontent.com/u/2228246?v=4","gravatar_id":"","url":"https://api.github.com/users/StephenMcConnel","html_url":"https://github.com/StephenMcConnel","followers_url":"https://api.github.com/users/StephenMcConnel/followers","following_url":"https://api.github.com/users/StephenMcConnel/following{/other_user}","gists_url":"https://api.github.com/users/StephenMcConnel/gists{/gist_id}","starred_url":"https://api.github.com/users/StephenMcConnel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StephenMcConnel/subscriptions","organizations_url":"https://api.github.com/users/StephenMcConnel/orgs","repos_url":"https://api.github.com/users/StephenMcConnel/repos","events_url":"https://api.github.com/users/StephenMcConnel/events{/privacy}","received_events_url":"https://api.github.com/users/StephenMcConnel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-05-09T22:06:47Z","updated_at":"2018-05-10T14:50:47Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/BloomBooks/BloomDesktop/pulls/2387","html_url":"https://github.com/BloomBooks/BloomDesktop/pull/2387","diff_url":"https://github.com/BloomBooks/BloomDesktop/pull/2387.diff","patch_url":"https://github.com/BloomBooks/BloomDesktop/pull/2387.patch"},"body":"\n\n<!-- Reviewable:start -->\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/bloombooks/bloomdesktop/2387)\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/BloomBooks/BloomDesktop/issues/comments/388077132","html_url":"https://github.com/BloomBooks/BloomDesktop/pull/2387#issuecomment-388077132","issue_url":"https://api.github.com/repos/BloomBooks/BloomDesktop/issues/2387","id":388077132,"user":{"login":"StephenMcConnel","id":2228246,"avatar_url":"https://avatars3.githubusercontent.com/u/2228246?v=4","gravatar_id":"","url":"https://api.github.com/users/StephenMcConnel","html_url":"https://github.com/StephenMcConnel","followers_url":"https://api.github.com/users/StephenMcConnel/followers","following_url":"https://api.github.com/users/StephenMcConnel/following{/other_user}","gists_url":"https://api.github.com/users/StephenMcConnel/gists{/gist_id}","starred_url":"https://api.github.com/users/StephenMcConnel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StephenMcConnel/subscriptions","organizations_url":"https://api.github.com/users/StephenMcConnel/orgs","repos_url":"https://api.github.com/users/StephenMcConnel/repos","events_url":"https://api.github.com/users/StephenMcConnel/events{/privacy}","received_events_url":"https://api.github.com/users/StephenMcConnel/received_events","type":"User","site_admin":false},"created_at":"2018-05-10T14:50:47Z","updated_at":"2018-05-10T14:50:47Z","author_association":"CONTRIBUTOR","body":"\n\n\n\nReview status: all files reviewed at latest revision, 1 unresolved discussion.\n\n---\n\n*[src/BloomExe/Publish/Epub/EpubMaker.cs, line 1542 at r1](https://reviewable.io/reviews/bloombooks/bloomdesktop/2387#-LC8yJNO9V0g6dm7XXnE:-LC9WIQ7A6bGHqOQYqf0:b-dz0e7w) ([raw file](https://github.com/bloombooks/bloomdesktop/blob/32121b31f45f1a0e9448cd2c8aff91672e49f84c/src/BloomExe/Publish/Epub/EpubMaker.cs#L1542)):*\n<details><summary><i>Previously, andrew-polk wrote…</i></summary><blockquote>\n\nHelp me understand.\nWe certainly don't want to run a method \"GetBytesOfReducedImage\" and get back something with the same properties yet which is larger. How does transparency factor in?\n</blockquote></details>\n\nWhen the cover image was background, it had to have a transparent background.  So the GetBytesOfReducedImage would convert all .png files to have a transparent background as well as possibly smaller dimensions.  The problem with .png files is that many line drawings are stored as 1-bit (true black and white) or possibly 2-bit/4-bit color (grayscale probably).  The .Net/Mono code only handles down to 8-bit color, so even a drawing with smaller dimensions can result in a larger file.  But do we still see any need for transparent backgrounds?  If not, then we should discard the adjusted image if it results in a bigger file.\n\n---\n\n\n*Comments from [Reviewable](https://reviewable.io/reviews/bloombooks/bloomdesktop/2387)*\n<!-- Sent from Reviewable.io -->\n"}}
{"actor":{"display_login":"StephenMcConnel"}}