{"action":"created","issue":{"url":"https://api.github.com/repos/xbmc/xbmc/issues/6202","labels_url":"https://api.github.com/repos/xbmc/xbmc/issues/6202/labels{/name}","comments_url":"https://api.github.com/repos/xbmc/xbmc/issues/6202/comments","events_url":"https://api.github.com/repos/xbmc/xbmc/issues/6202/events","html_url":"https://github.com/xbmc/xbmc/pull/6202","id":54259095,"number":6202,"title":"webserver: image resizing","user":{"login":"Montellese","id":75864,"avatar_url":"https://avatars.githubusercontent.com/u/75864?v=3","gravatar_id":"","url":"https://api.github.com/users/Montellese","html_url":"https://github.com/Montellese","followers_url":"https://api.github.com/users/Montellese/followers","following_url":"https://api.github.com/users/Montellese/following{/other_user}","gists_url":"https://api.github.com/users/Montellese/gists{/gist_id}","starred_url":"https://api.github.com/users/Montellese/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Montellese/subscriptions","organizations_url":"https://api.github.com/users/Montellese/orgs","repos_url":"https://api.github.com/users/Montellese/repos","events_url":"https://api.github.com/users/Montellese/events{/privacy}","received_events_url":"https://api.github.com/users/Montellese/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/xbmc/xbmc/labels/Feature","name":"Feature","color":"0b02e1"},{"url":"https://api.github.com/repos/xbmc/xbmc/labels/RFC","name":"RFC","color":"d7e102"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-01-13T22:41:13Z","updated_at":"2015-01-15T11:03:24Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/xbmc/xbmc/pulls/6202","html_url":"https://github.com/xbmc/xbmc/pull/6202","diff_url":"https://github.com/xbmc/xbmc/pull/6202.diff","patch_url":"https://github.com/xbmc/xbmc/pull/6202.patch"},"body":"This work is based on #6201 and I'm only putting it up as a PR already because I would like to get feedback on how best to implement the image resizing. What I/we want to be able to do is let people call a URL on our webserver like\r\n```http://localhost/transformation/image/<some urlencoded image:// path>?width=720```\r\nto retrieve an image (whose `image://` URL has been exposed by JSON-RPC) in a specific size. This is mainly helpful for webinterfaces and remote applications which have limited screen size and can't make any use of a Full HD fanart image.\r\n\r\nThe webserver implementation side is pretty straight forward and supports all features like `Last-Modified`,  `Content-Type`, cache and range handling (thanks to the refactor in #6201).\r\n\r\nThe image resizing implementation is the simplest I came across when looking into the texture cache but it e.g. doesn't support the special `OMXImage` implementation and I have no idea if it's the right/best way to go and how fast/slow it is. So any feedback on that is very welcome."},"comment":{"url":"https://api.github.com/repos/xbmc/xbmc/issues/comments/70070245","html_url":"https://github.com/xbmc/xbmc/pull/6202#issuecomment-70070245","issue_url":"https://api.github.com/repos/xbmc/xbmc/issues/6202","id":70070245,"user":{"login":"Tolriq","id":932609,"avatar_url":"https://avatars.githubusercontent.com/u/932609?v=3","gravatar_id":"","url":"https://api.github.com/users/Tolriq","html_url":"https://github.com/Tolriq","followers_url":"https://api.github.com/users/Tolriq/followers","following_url":"https://api.github.com/users/Tolriq/following{/other_user}","gists_url":"https://api.github.com/users/Tolriq/gists{/gist_id}","starred_url":"https://api.github.com/users/Tolriq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tolriq/subscriptions","organizations_url":"https://api.github.com/users/Tolriq/orgs","repos_url":"https://api.github.com/users/Tolriq/repos","events_url":"https://api.github.com/users/Tolriq/events{/privacy}","received_events_url":"https://api.github.com/users/Tolriq/received_events","type":"User","site_admin":false},"created_at":"2015-01-15T11:03:24Z","updated_at":"2015-01-15T11:03:24Z","body":"I'm not sure to understand contain, but if the image is not the asked size then there will be scaling on display device, meaning used resources on device for nothing as doing the crop on source would have used nearly the same amount of resources than other resizing methods.\r\n\r\nIMO crop is way more useful than contain to have a proper display in any listing, and resizing is really useful for listing as to display just one image the gain is not worth the effort."}}