{"action":"reopened","issue":{"url":"https://api.github.com/repos/luberda-molinet/FFImageLoading/issues/522","repository_url":"https://api.github.com/repos/luberda-molinet/FFImageLoading","labels_url":"https://api.github.com/repos/luberda-molinet/FFImageLoading/issues/522/labels{/name}","comments_url":"https://api.github.com/repos/luberda-molinet/FFImageLoading/issues/522/comments","events_url":"https://api.github.com/repos/luberda-molinet/FFImageLoading/issues/522/events","html_url":"https://github.com/luberda-molinet/FFImageLoading/issues/522","id":212049409,"number":522,"title":"Svg-s are rendered pixelated ","user":{"login":"kyurkchyan","id":3243139,"avatar_url":"https://avatars3.githubusercontent.com/u/3243139?v=4","gravatar_id":"","url":"https://api.github.com/users/kyurkchyan","html_url":"https://github.com/kyurkchyan","followers_url":"https://api.github.com/users/kyurkchyan/followers","following_url":"https://api.github.com/users/kyurkchyan/following{/other_user}","gists_url":"https://api.github.com/users/kyurkchyan/gists{/gist_id}","starred_url":"https://api.github.com/users/kyurkchyan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyurkchyan/subscriptions","organizations_url":"https://api.github.com/users/kyurkchyan/orgs","repos_url":"https://api.github.com/users/kyurkchyan/repos","events_url":"https://api.github.com/users/kyurkchyan/events{/privacy}","received_events_url":"https://api.github.com/users/kyurkchyan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2017-03-06T08:05:19Z","updated_at":"2018-03-28T22:37:11Z","closed_at":null,"author_association":"NONE","body":"Take a look at this screenshot\r\n\r\n![image](https://cloud.githubusercontent.com/assets/3243139/23601318/487cc710-0264-11e7-9886-fb5d4a03050a.png)\r\n\r\nAs you can see the image quality is very low. This is I believe because device screen scaling factor is not taken into consideration in the `SvgDataResolver`.  In the line where bitmap is created\r\n`using (var bitmap = new SKBitmap((int)sizeX, (int)sizeY))`\r\nBefore supplying sizeX and sizeY to SKBitmap they should be multiplied by the screen scaling factor. And this would make the images look nice and crisp.\r\n\r\nThis might also be related to `UseDipUnits` property. I couldn't find any place that this property was taken in account during the image rendering. It's used to create cache keys but nothing else. I think there should be a code like this before creating SKBitmap\r\n\r\n`if(UseDipUnits)\r\n\t\t    {\r\n\t\t        sizeX *= scalingFactor;\r\n                sizeY *= scalingFactor;\r\n            }`\r\n\r\nOne of the solutions could be having static property called `ScalingFactor `inside the `SvgDataResolver`, and set it to corresponding values inside iOS and Android projects.\r\n\r\n`SvgDataResolver.ScalingFactor = (uint)UIScreen.MainScreen.Scale;`\r\n\r\n`SvgDataResolver.ScalingFactor = (uint)Resources.DisplayMetrics.Density;`\r\n"}}
{"actor":{"display_login":"daniel-luberda"}}