{"action":"created","issue":{"url":"https://api.github.com/repos/option8/RetroConnector/issues/5","labels_url":"https://api.github.com/repos/option8/RetroConnector/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/option8/RetroConnector/issues/5/comments","events_url":"https://api.github.com/repos/option8/RetroConnector/issues/5/events","html_url":"https://github.com/option8/RetroConnector/pull/5","id":104211775,"number":5,"title":"Fix the pixel mapping and improve image processing","user":{"login":"marcan","id":98387,"avatar_url":"https://avatars.githubusercontent.com/u/98387?v=3","gravatar_id":"","url":"https://api.github.com/users/marcan","html_url":"https://github.com/marcan","followers_url":"https://api.github.com/users/marcan/followers","following_url":"https://api.github.com/users/marcan/following{/other_user}","gists_url":"https://api.github.com/users/marcan/gists{/gist_id}","starred_url":"https://api.github.com/users/marcan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcan/subscriptions","organizations_url":"https://api.github.com/users/marcan/orgs","repos_url":"https://api.github.com/users/marcan/repos","events_url":"https://api.github.com/users/marcan/events{/privacy}","received_events_url":"https://api.github.com/users/marcan/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-01T08:13:55Z","updated_at":"2015-09-01T14:52:09Z","closed_at":"2015-09-01T14:51:07Z","pull_request":{"url":"https://api.github.com/repos/option8/RetroConnector/pulls/5","html_url":"https://github.com/option8/RetroConnector/pull/5","diff_url":"https://github.com/option8/RetroConnector/pull/5.diff","patch_url":"https://github.com/option8/RetroConnector/pull/5.patch"},"body":"The indexing of the byte array was wrong, which is why the images\r\nproduced had that funky spiral shape (which wasn't real). The polar\r\nmapping was also incorrect (the tracks were mapped to cylinders and vice\r\nversa).\r\n\r\nBesides correcting these issues, improve the output by:\r\n* Point scaling the source vertically by 3x to produce better-defined\r\n  tracks (and avoid scaling to 1024px tall which is unnecessary)\r\n* Overlaying a \"venetian blinds\" pattern to add gaps between tracks\r\n* Resizing horizontally to 3072 pixels to reduce aliasing\r\n* 2x oversampling on the polar conversion again to reduce aliasing\r\n\r\nNow, the irony is that you don't need the python at all... ImageMagick can load raw data into an image by itself just fine:\r\n\r\n    convert -depth 8 -size 4096x35 gray:PRODOS_B.4.dsk -scale 100%x300% -resize '3072x!' -size 3072x115 '(' pattern:horizontal3 -negate -alpha copy -fx '#000' ')' -composite -virtual-pixel HorizontalTile -flip +distort Polar '1024 220' -resize '50%x50%' PRODOS_B.4.png\r\n\r\nBut I figured I'd fix the Python instead of replacing it with a small shell script ;-)"},"comment":{"url":"https://api.github.com/repos/option8/RetroConnector/issues/comments/136749897","html_url":"https://github.com/option8/RetroConnector/pull/5#issuecomment-136749897","issue_url":"https://api.github.com/repos/option8/RetroConnector/issues/5","id":136749897,"user":{"login":"option8","id":1827400,"avatar_url":"https://avatars.githubusercontent.com/u/1827400?v=3","gravatar_id":"","url":"https://api.github.com/users/option8","html_url":"https://github.com/option8","followers_url":"https://api.github.com/users/option8/followers","following_url":"https://api.github.com/users/option8/following{/other_user}","gists_url":"https://api.github.com/users/option8/gists{/gist_id}","starred_url":"https://api.github.com/users/option8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/option8/subscriptions","organizations_url":"https://api.github.com/users/option8/orgs","repos_url":"https://api.github.com/users/option8/repos","events_url":"https://api.github.com/users/option8/events{/privacy}","received_events_url":"https://api.github.com/users/option8/received_events","type":"User","site_admin":false},"created_at":"2015-09-01T14:52:09Z","updated_at":"2015-09-01T14:52:09Z","body":"Thanks! This is more what I was expecting to see, and I never got past figuring out the spiral weirdness."}}