{"action":"created","issue":{"url":"https://api.github.com/repos/ImageMagick/ImageMagick/issues/137","repository_url":"https://api.github.com/repos/ImageMagick/ImageMagick","labels_url":"https://api.github.com/repos/ImageMagick/ImageMagick/issues/137/labels{/name}","comments_url":"https://api.github.com/repos/ImageMagick/ImageMagick/issues/137/comments","events_url":"https://api.github.com/repos/ImageMagick/ImageMagick/issues/137/events","html_url":"https://github.com/ImageMagick/ImageMagick/pull/137","id":135718954,"number":137,"title":"Fix multiple DDS output issues.","user":{"login":"Hrnchamd","id":1218432,"avatar_url":"https://avatars.githubusercontent.com/u/1218432?v=3","gravatar_id":"","url":"https://api.github.com/users/Hrnchamd","html_url":"https://github.com/Hrnchamd","followers_url":"https://api.github.com/users/Hrnchamd/followers","following_url":"https://api.github.com/users/Hrnchamd/following{/other_user}","gists_url":"https://api.github.com/users/Hrnchamd/gists{/gist_id}","starred_url":"https://api.github.com/users/Hrnchamd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hrnchamd/subscriptions","organizations_url":"https://api.github.com/users/Hrnchamd/orgs","repos_url":"https://api.github.com/users/Hrnchamd/repos","events_url":"https://api.github.com/users/Hrnchamd/events{/privacy}","received_events_url":"https://api.github.com/users/Hrnchamd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-02-23T12:05:11Z","updated_at":"2016-03-13T13:13:05Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ImageMagick/ImageMagick/pulls/137","html_url":"https://github.com/ImageMagick/ImageMagick/pull/137","diff_url":"https://github.com/ImageMagick/ImageMagick/pull/137.diff","patch_url":"https://github.com/ImageMagick/ImageMagick/pull/137.patch"},"body":"Fixes errors in encoding logic for DXT5 alpha, which caused alpha blockiness and incorrect alphas if a block hit a certain branch of FixRange.\r\n\r\nFixes DDS header to follow the specification. Writes linear size or stride depending on compression. Should prevent output DDS files from crashing GIMP.\r\n\r\nAddresses problems in https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=27169&sid=39ea05ff30d1fe5a2ae55ce4d547207a\r\n\r\nThe original code seems to be converted from libsquish, but suffered some logic errors in conversion. It lacks unit tests comparing the output to libsquish output, which would have caught the alpha problem."},"comment":{"url":"https://api.github.com/repos/ImageMagick/ImageMagick/issues/comments/195954985","html_url":"https://github.com/ImageMagick/ImageMagick/pull/137#issuecomment-195954985","issue_url":"https://api.github.com/repos/ImageMagick/ImageMagick/issues/137","id":195954985,"user":{"login":"Hrnchamd","id":1218432,"avatar_url":"https://avatars.githubusercontent.com/u/1218432?v=3","gravatar_id":"","url":"https://api.github.com/users/Hrnchamd","html_url":"https://github.com/Hrnchamd","followers_url":"https://api.github.com/users/Hrnchamd/followers","following_url":"https://api.github.com/users/Hrnchamd/following{/other_user}","gists_url":"https://api.github.com/users/Hrnchamd/gists{/gist_id}","starred_url":"https://api.github.com/users/Hrnchamd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hrnchamd/subscriptions","organizations_url":"https://api.github.com/users/Hrnchamd/orgs","repos_url":"https://api.github.com/users/Hrnchamd/repos","events_url":"https://api.github.com/users/Hrnchamd/events{/privacy}","received_events_url":"https://api.github.com/users/Hrnchamd/received_events","type":"User","site_admin":false},"created_at":"2016-03-13T13:13:05Z","updated_at":"2016-03-13T13:13:05Z","body":"Your linked page is referring solely to the pitch calculation, rather than the header specification. The actual DDS_HEADER spec at https://msdn.microsoft.com/en-us/library/windows/desktop/bb943982%28v=vs.85%29.aspx specifies the correct meaning for dwPitchOrLinearSize. With an incorrect value, GIMP will fail loading the image.\r\n\r\nIt seems like the DDS summary page was updated for DX10 without referencing the rest of the specification properly, ignoring that dwPitchOrLinearSize semantics depend on the pixel format."}}