{"action":"created","issue":{"url":"https://api.github.com/repos/xbmc/xbmc/issues/6986","labels_url":"https://api.github.com/repos/xbmc/xbmc/issues/6986/labels{/name}","comments_url":"https://api.github.com/repos/xbmc/xbmc/issues/6986/comments","events_url":"https://api.github.com/repos/xbmc/xbmc/issues/6986/events","html_url":"https://github.com/xbmc/xbmc/pull/6986","id":69543831,"number":6986,"title":"support specifying the image scaling algorithm for image resizing/caching","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/Improvement","name":"Improvement","color":"0b02e1"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-20T09:18:33Z","updated_at":"2015-04-20T09:47:30Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/xbmc/xbmc/pulls/6986","html_url":"https://github.com/xbmc/xbmc/pull/6986","diff_url":"https://github.com/xbmc/xbmc/pull/6986.diff","patch_url":"https://github.com/xbmc/xbmc/pull/6986.patch"},"body":"These commits add the possibility to specify the image scaling algorithm to be used for image resizing/caching using `CPicture` (no support for RPI's `OMXImage`). The scaling algorithm can be specified in two ways:\r\n* through `<imagescalingalgorithm>` in `advancedsettings.xml` (which will automatically apply to all images being cached but only if they are resized)\r\n* as a `scaling_algorithm` option in the `image://` URL (this will overrule whatever has been set in `advancedsettings.xml`)\r\n\r\nI wasn't sure whether to put the option in `advancedsettings.xml` or as a GUI setting. I put it in `advancedsettings.xml` because the maximum resolution settings are there as well but having it as a GUI setting would have the advantage that we could specify different default depending on the platform.\r\n\r\nDue to the support for a `scaling_algorithm` option in the `image://` URL this can also be used when retrieving resized images through the webserver.\r\n\r\nI've noticed that there is also some resizing logic in `CJpegIO` which doesn't benefit from this change. I also don't know how we resize images/textures in the GUI so this only affects the quality of images we cache.\r\n\r\nThis is something that has bothered me for a while now and manually increasing the maximum image size/resolution of cached images through `advancedsettings.xml` hasn't been good enough. And I don't seem to be the only one as there are several threads in the forum about this. One of them is http://forum.kodi.tv/showthread.php?tid=200401.\r\n\r\n**Needs Xcode sync**"},"comment":{"url":"https://api.github.com/repos/xbmc/xbmc/issues/comments/94410201","html_url":"https://github.com/xbmc/xbmc/pull/6986#issuecomment-94410201","issue_url":"https://api.github.com/repos/xbmc/xbmc/issues/6986","id":94410201,"user":{"login":"ace20022","id":2150851,"avatar_url":"https://avatars.githubusercontent.com/u/2150851?v=3","gravatar_id":"","url":"https://api.github.com/users/ace20022","html_url":"https://github.com/ace20022","followers_url":"https://api.github.com/users/ace20022/followers","following_url":"https://api.github.com/users/ace20022/following{/other_user}","gists_url":"https://api.github.com/users/ace20022/gists{/gist_id}","starred_url":"https://api.github.com/users/ace20022/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ace20022/subscriptions","organizations_url":"https://api.github.com/users/ace20022/orgs","repos_url":"https://api.github.com/users/ace20022/repos","events_url":"https://api.github.com/users/ace20022/events{/privacy}","received_events_url":"https://api.github.com/users/ace20022/received_events","type":"User","site_admin":false},"created_at":"2015-04-20T09:47:30Z","updated_at":"2015-04-20T09:47:30Z","body":"First, nice addition.\r\n\r\n> I also don't know how we resize images/textures in the GUI so this only affects the quality of images we cache.\r\n\r\nThat is the real problem imo. When I played around with sws_scale I could not see any differences in quality, at least with posters.\r\n"}}