{"action":"created","issue":{"url":"https://api.github.com/repos/processwire/processwire-requests/issues/150","repository_url":"https://api.github.com/repos/processwire/processwire-requests","labels_url":"https://api.github.com/repos/processwire/processwire-requests/issues/150/labels{/name}","comments_url":"https://api.github.com/repos/processwire/processwire-requests/issues/150/comments","events_url":"https://api.github.com/repos/processwire/processwire-requests/issues/150/events","html_url":"https://github.com/processwire/processwire-requests/issues/150","id":288219745,"number":150,"title":"Image cropping with focus points","user":{"login":"thomasaull","id":227756,"avatar_url":"https://avatars0.githubusercontent.com/u/227756?v=4","gravatar_id":"","url":"https://api.github.com/users/thomasaull","html_url":"https://github.com/thomasaull","followers_url":"https://api.github.com/users/thomasaull/followers","following_url":"https://api.github.com/users/thomasaull/following{/other_user}","gists_url":"https://api.github.com/users/thomasaull/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasaull/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasaull/subscriptions","organizations_url":"https://api.github.com/users/thomasaull/orgs","repos_url":"https://api.github.com/users/thomasaull/repos","events_url":"https://api.github.com/users/thomasaull/events{/privacy}","received_events_url":"https://api.github.com/users/thomasaull/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":30,"created_at":"2018-01-12T19:18:47Z","updated_at":"2018-02-07T22:33:19Z","closed_at":null,"author_association":"NONE","body":"I've read in the [official roadmap announcement](http://processwire.com/blog/posts/processwire-2018-roadmap/) there will be support for predefined crops in the core in 2018. I want to opt for a slightly different approach: Instead of predefined crops, I feel like it would make more sense to make use of focus points ([actually there is an outdated module for that](https://github.com/phlppschrr/ImageFocusArea)) \r\n\r\nThe reason is simple, in times of responsive websites and images, it doesn't really makes sense to have a predefined dimension for an image. I want different dimensons for mobile, tablet, large screens, … Of course it'd be possible to define multiple crops but the concept of defining a focus point and cropping the images after that, makes much more sense in my opinion. \r\n\r\n<img width=\"889\" alt=\"my sketches 2 - 2018-01-12 20 01 20\" src=\"https://user-images.githubusercontent.com/227756/34891172-db09be06-f7d4-11e7-805d-90530c81d268.png\">\r\n"},"comment":{"url":"https://api.github.com/repos/processwire/processwire-requests/issues/comments/363934062","html_url":"https://github.com/processwire/processwire-requests/issues/150#issuecomment-363934062","issue_url":"https://api.github.com/repos/processwire/processwire-requests/issues/150","id":363934062,"user":{"login":"horst-n","id":4884546,"avatar_url":"https://avatars2.githubusercontent.com/u/4884546?v=4","gravatar_id":"","url":"https://api.github.com/users/horst-n","html_url":"https://github.com/horst-n","followers_url":"https://api.github.com/users/horst-n/followers","following_url":"https://api.github.com/users/horst-n/following{/other_user}","gists_url":"https://api.github.com/users/horst-n/gists{/gist_id}","starred_url":"https://api.github.com/users/horst-n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/horst-n/subscriptions","organizations_url":"https://api.github.com/users/horst-n/orgs","repos_url":"https://api.github.com/users/horst-n/repos","events_url":"https://api.github.com/users/horst-n/events{/privacy}","received_events_url":"https://api.github.com/users/horst-n/received_events","type":"User","site_admin":false},"created_at":"2018-02-07T22:33:19Z","updated_at":"2018-02-07T22:33:19Z","author_association":"NONE","body":"@ryancramerdesign Ryan, I cannot reproduce the issue you said. Maybe it got covered by one little change I made in the ImageSizerEngineGD (?):\r\n\r\n`$zoom = is_array($this->cropping) && isset($this->cropping[2]) && false !== strpos(strval($this->cropping[0]), '%') && false !== strpos(strval($this->cropping[1]), '%') ? $this->cropping[2] : 0;`\r\n\r\nOthers than that I haven't changed. Here is the output of an [testimage](http://biriba.de/pw_pop3/pw-zoom-crop-testimage.jpg) via [foreach loops](http://biriba.de/pw_pop3/pw-zoom-crop-foreachloops.phps) for zoom, top, left:\r\n\r\n![pw_screen__focus-zoom-cropping](https://user-images.githubusercontent.com/4884546/35944647-6f31d87e-0c5d-11e8-967f-8134863d53bc.jpg)\r\n"}}
{"actor":{"display_login":"horst-n"}}