{"action":"created","issue":{"url":"https://api.github.com/repos/directus/api/issues/494","repository_url":"https://api.github.com/repos/directus/api","labels_url":"https://api.github.com/repos/directus/api/issues/494/labels{/name}","comments_url":"https://api.github.com/repos/directus/api/issues/494/comments","events_url":"https://api.github.com/repos/directus/api/issues/494/events","html_url":"https://github.com/directus/api/pull/494","id":371564072,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIzOTgzMDM1","number":494,"title":"File-Preview Interface: Image Cropper Added","user":{"login":"theharshin","id":7118937,"node_id":"MDQ6VXNlcjcxMTg5Mzc=","avatar_url":"https://avatars1.githubusercontent.com/u/7118937?v=4","gravatar_id":"","url":"https://api.github.com/users/theharshin","html_url":"https://github.com/theharshin","followers_url":"https://api.github.com/users/theharshin/followers","following_url":"https://api.github.com/users/theharshin/following{/other_user}","gists_url":"https://api.github.com/users/theharshin/gists{/gist_id}","starred_url":"https://api.github.com/users/theharshin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theharshin/subscriptions","organizations_url":"https://api.github.com/users/theharshin/orgs","repos_url":"https://api.github.com/users/theharshin/repos","events_url":"https://api.github.com/users/theharshin/events{/privacy}","received_events_url":"https://api.github.com/users/theharshin/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-10-18T14:39:38Z","updated_at":"2018-10-19T19:05:51Z","closed_at":"2018-10-19T16:29:30Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/directus/api/pulls/494","html_url":"https://github.com/directus/api/pull/494","diff_url":"https://github.com/directus/api/pull/494.diff","patch_url":"https://github.com/directus/api/pull/494.patch"},"body":"Features added:\r\n- Cropping\r\n- Rotating\r\n- Flipping\r\n- Aspect Ratio\r\n\r\nImage cropping can be enabled by enabling 'Image Editor' option in 'Editing Options' section of Interface. I've chosen to keep checkboxes because in future we can add other media editing options.\r\nNote:\r\nKindly have a look at how I've managed the image caching issue. If you can suggest a better option, I'll update that.\r\nAlso, a large base64 string throws an error due to Directus activity column.\r\n"},"comment":{"url":"https://api.github.com/repos/directus/api/issues/comments/431466543","html_url":"https://github.com/directus/api/pull/494#issuecomment-431466543","issue_url":"https://api.github.com/repos/directus/api/issues/494","id":431466543,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMTQ2NjU0Mw==","user":{"login":"benhaynes","id":522079,"node_id":"MDQ6VXNlcjUyMjA3OQ==","avatar_url":"https://avatars1.githubusercontent.com/u/522079?v=4","gravatar_id":"","url":"https://api.github.com/users/benhaynes","html_url":"https://github.com/benhaynes","followers_url":"https://api.github.com/users/benhaynes/followers","following_url":"https://api.github.com/users/benhaynes/following{/other_user}","gists_url":"https://api.github.com/users/benhaynes/gists{/gist_id}","starred_url":"https://api.github.com/users/benhaynes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benhaynes/subscriptions","organizations_url":"https://api.github.com/users/benhaynes/orgs","repos_url":"https://api.github.com/users/benhaynes/repos","events_url":"https://api.github.com/users/benhaynes/events{/privacy}","received_events_url":"https://api.github.com/users/benhaynes/received_events","type":"User","site_admin":false},"created_at":"2018-10-19T19:05:51Z","updated_at":"2018-10-19T19:05:51Z","author_association":"CONTRIBUTOR","body":"After messing with this for a while, I can tell you did an amazing job! I know this has already been merged, but here is the feedback @theharshin ...\r\n\r\n1. When cropping, you can drag the image _outside_ the crop zone so that there is negative space (alpha:0). Is it possible to restrict movement so that you can only crop _within_ the image?\r\n2. An issue I've seen from #1 is that when it has to include an alpha layer (transparent zone) it seems like it's generating a PNG but saving it as a JPG file extension. Can we preserve the original file type/extension?\r\n3. When saving the new image it seems like we are getting additional compression/artifacts with each save... which makes the image a bit lower quality each time. Do we have a setting for what quality to use? Also, without moving anything, it is adding an alpha transparency to the right of the image. See the example below:\r\n\r\n### Original\r\n\r\n![screen shot 2018-10-19 at 11 10 17 am3](https://user-images.githubusercontent.com/522079/47238383-ff413080-d3af-11e8-96da-260d27fa4253.png)\r\n\r\n### After 5 Saves (no other changes)\r\n\r\n![screen_shot_2018-10-19_at_11 10 17_am3](https://user-images.githubusercontent.com/522079/47238401-14b65a80-d3b0-11e8-82d7-b0e4ec1fa894.png)\r\n"}}
{"actor":{"display_login":"benhaynes"}}