{"action":"created","issue":{"url":"https://api.github.com/repos/meskarune/i3lock-fancy/issues/108","repository_url":"https://api.github.com/repos/meskarune/i3lock-fancy","labels_url":"https://api.github.com/repos/meskarune/i3lock-fancy/issues/108/labels{/name}","comments_url":"https://api.github.com/repos/meskarune/i3lock-fancy/issues/108/comments","events_url":"https://api.github.com/repos/meskarune/i3lock-fancy/issues/108/events","html_url":"https://github.com/meskarune/i3lock-fancy/pull/108","id":286305898,"node_id":"MDExOlB1bGxSZXF1ZXN0MTYxMzUzMzgz","number":108,"title":"added parameter to the pixelation flag to control the amount of pixelation","user":{"login":"qw3ry","id":3729858,"node_id":"MDQ6VXNlcjM3Mjk4NTg=","avatar_url":"https://avatars3.githubusercontent.com/u/3729858?v=4","gravatar_id":"","url":"https://api.github.com/users/qw3ry","html_url":"https://github.com/qw3ry","followers_url":"https://api.github.com/users/qw3ry/followers","following_url":"https://api.github.com/users/qw3ry/following{/other_user}","gists_url":"https://api.github.com/users/qw3ry/gists{/gist_id}","starred_url":"https://api.github.com/users/qw3ry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qw3ry/subscriptions","organizations_url":"https://api.github.com/users/qw3ry/orgs","repos_url":"https://api.github.com/users/qw3ry/repos","events_url":"https://api.github.com/users/qw3ry/events{/privacy}","received_events_url":"https://api.github.com/users/qw3ry/received_events","type":"User","site_admin":false},"labels":[{"id":145960056,"node_id":"MDU6TGFiZWwxNDU5NjAwNTY=","url":"https://api.github.com/repos/meskarune/i3lock-fancy/labels/enhancement","name":"enhancement","color":"c5def5","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-01-05T14:38:04Z","updated_at":"2018-08-07T18:54:50Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/meskarune/i3lock-fancy/pulls/108","html_url":"https://github.com/meskarune/i3lock-fancy/pull/108","diff_url":"https://github.com/meskarune/i3lock-fancy/pull/108.diff","patch_url":"https://github.com/meskarune/i3lock-fancy/pull/108.patch"},"body":"I added a parameter to the pixelation flag to be able to customize the amount of pixelation.\r\n\r\nI'm not completly content with the code yet, because the introduction of an optional parameter causes some issues:\r\n\r\n* The parameter needs to be written as `--pixelate=0.1`. Neither `--pixelate 0.1` nor `--pixelate0.1` does work. This is due to the way `getopt` works.\r\n* The short form cannot have the optional parameter. If I had added an optional parameter to `-p` the currently working syntax `lock -pg` would break.\r\n\r\nI thought about adding another flag with a required parameter instead, but I don't believe it is a good idea to add a _second_ pixelation parameter.\r\n\r\nA second issue is that the image resizing used for pixelation does introduce rounding errors in the image size (that means the _converted_ image will not have the same resolution as the input image).\r\nI believe this is not an error introduced by my changes, rather the problem occurs with the current default scaling as well, if the screen resolution is not divisible by 10, which is the case for most common screen resolutions (`1920x1080` ~> `(192*10)x(108*10)`). Basically, the user has to ensure that the factor is reasonably for his screen resolution.\r\nIf the factor is badly chosen for the resolution, the image will either be to large (thus not showing a part of the screenshot) or to small (thus showing a white bar at the right edge of the screen).\r\nYou can probably see the bad result if you choose a factor like 0.07.\r\n\r\nAll in all, I still think my changes provide a valuable contribution because I restricted myself to _adding_ functionality without removing currently working functionality. If you have a proposal how to change my code to work better with the existing code, I'd be happy to do those changes."},"comment":{"url":"https://api.github.com/repos/meskarune/i3lock-fancy/issues/comments/411163734","html_url":"https://github.com/meskarune/i3lock-fancy/pull/108#issuecomment-411163734","issue_url":"https://api.github.com/repos/meskarune/i3lock-fancy/issues/108","id":411163734,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMTE2MzczNA==","user":{"login":"qw3ry","id":3729858,"node_id":"MDQ6VXNlcjM3Mjk4NTg=","avatar_url":"https://avatars3.githubusercontent.com/u/3729858?v=4","gravatar_id":"","url":"https://api.github.com/users/qw3ry","html_url":"https://github.com/qw3ry","followers_url":"https://api.github.com/users/qw3ry/followers","following_url":"https://api.github.com/users/qw3ry/following{/other_user}","gists_url":"https://api.github.com/users/qw3ry/gists{/gist_id}","starred_url":"https://api.github.com/users/qw3ry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qw3ry/subscriptions","organizations_url":"https://api.github.com/users/qw3ry/orgs","repos_url":"https://api.github.com/users/qw3ry/repos","events_url":"https://api.github.com/users/qw3ry/events{/privacy}","received_events_url":"https://api.github.com/users/qw3ry/received_events","type":"User","site_admin":false},"created_at":"2018-08-07T18:54:50Z","updated_at":"2018-08-07T18:54:50Z","author_association":"NONE","body":"@meskarune not sure what you mean. The semantics of the `-p`-flag did not change at all, I just explicitly wrote the (current) default into the readme. This can be overwritten with `f` by using `--pixelate f` instead"}}
{"actor":{"display_login":"qw3ry"}}