{"action":"created","issue":{"url":"https://api.github.com/repos/imazen-discovery/test_issue_import/issues/61","labels_url":"https://api.github.com/repos/imazen-discovery/test_issue_import/issues/61/labels{/name}","comments_url":"https://api.github.com/repos/imazen-discovery/test_issue_import/issues/61/comments","events_url":"https://api.github.com/repos/imazen-discovery/test_issue_import/issues/61/events","html_url":"https://github.com/imazen-discovery/test_issue_import/issues/61","id":56578832,"number":61,"title":"gdImageLine may misbehave or enter infinite loop if anti-aliasing is used and image size > 32768","user":{"login":"imazen-bot","id":10421256,"avatar_url":"https://avatars.githubusercontent.com/u/10421256?v=3","gravatar_id":"","url":"https://api.github.com/users/imazen-bot","html_url":"https://github.com/imazen-bot","followers_url":"https://api.github.com/users/imazen-bot/followers","following_url":"https://api.github.com/users/imazen-bot/following{/other_user}","gists_url":"https://api.github.com/users/imazen-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/imazen-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/imazen-bot/subscriptions","organizations_url":"https://api.github.com/users/imazen-bot/orgs","repos_url":"https://api.github.com/users/imazen-bot/repos","events_url":"https://api.github.com/users/imazen-bot/events{/privacy}","received_events_url":"https://api.github.com/users/imazen-bot/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-04T19:57:15Z","updated_at":"2015-02-04T19:57:16Z","closed_at":"2015-02-04T19:57:16Z","body":"Please look at the following piece of code:\n\n    \n    #include<stdio.h>\n    #include \"gd.h\"\n    \n    int main() {\n      /* Declare the image */\n      gdImagePtr im;\n      /* Declare output files */\n      FILE *pngout;\n      int black, white;\n      \n      im = gdImageCreateTrueColor(63318, 771);\n    \n      /* Allocate the color white (red, green and blue all maximum). */\n      white = gdImageColorAllocate(im, 255, 255, 255);  \n      /* Allocate the color white (red, green and blue all maximum). */\n      black = gdImageColorAllocate(im, 0, 0, 0);  \n    \n      /* white background */\n      gdImageFill(im, 1, 1, white);\n    \n      gdImageSetAntiAliased(im, black);\n    \n      /* This line fails! */\n      gdImageLine(im, 28562, 631, 34266, 750, gdAntiAliased);  \n    \n      /* Open a file for writing. \"wb\" means \"write binary\", important\n        under MSDOS, harmless under Unix. */\n      pngout = fopen(\"test.png\", \"wb\");\n    \n     /* Output the image to the disk file in PNG format. */\n      gdImagePng(im, pngout);\n    \n      /* Close the files. */\n      fclose(pngout);\n    \n      /* Destroy the image in memory. */\n      gdImageDestroy(im);\n    }\n    \n\nThe function gdImageLine seems to never return, if at least one of the coordinates is over 32768 and anti-aliasing is used.\n\nWith coordinates different from the above example, the function may return, but the line drawn is still incorrect.\n\nThis problem was originally reported to gnuplot (bug no. 3377536), but I was able to isolate it.\n\ngd version: 2.0.36\nsystem: Ubuntu linux 10.04.2 32-bit\n\nPéter Juhász\n\n----------------------------------------\n- Bitbucket: https://bitbucket.org/libgd/gd-libgd/issue/5\n- Originally reported by: Anonymous\n- Originally created on: Jul 26 2011\n"},"comment":{"url":"https://api.github.com/repos/imazen-discovery/test_issue_import/issues/comments/72926617","html_url":"https://github.com/imazen-discovery/test_issue_import/issues/61#issuecomment-72926617","issue_url":"https://api.github.com/repos/imazen-discovery/test_issue_import/issues/61","id":72926617,"user":{"login":"imazen-bot","id":10421256,"avatar_url":"https://avatars.githubusercontent.com/u/10421256?v=3","gravatar_id":"","url":"https://api.github.com/users/imazen-bot","html_url":"https://github.com/imazen-bot","followers_url":"https://api.github.com/users/imazen-bot/followers","following_url":"https://api.github.com/users/imazen-bot/following{/other_user}","gists_url":"https://api.github.com/users/imazen-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/imazen-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/imazen-bot/subscriptions","organizations_url":"https://api.github.com/users/imazen-bot/orgs","repos_url":"https://api.github.com/users/imazen-bot/repos","events_url":"https://api.github.com/users/imazen-bot/events{/privacy}","received_events_url":"https://api.github.com/users/imazen-bot/received_events","type":"User","site_admin":false},"created_at":"2015-02-04T19:57:16Z","updated_at":"2015-02-04T19:57:16Z","body":"Also it is more about the horizontal distance covered by the line being larger than 32768 than the actual image size. We may clip the line before if it is not already done. no?\n\n----------------------------------------\nOriginally posted by [pierrejoye (Pierre Joye)](http://bitbucket.org/pierrejoye) on [Nov 28 2011 via Bitbucket](https://bitbucket.org/libgd/gd-libgd/issue/5/comments/#comment-3757416)\n"}}