diff options
Diffstat (limited to 'tests/gdimagerotate/php_bug_65070.c')
-rw-r--r-- | tests/gdimagerotate/php_bug_65070.c | 68 |
1 files changed, 33 insertions, 35 deletions
diff --git a/tests/gdimagerotate/php_bug_65070.c b/tests/gdimagerotate/php_bug_65070.c index f1b5504..87a43ea 100644 --- a/tests/gdimagerotate/php_bug_65070.c +++ b/tests/gdimagerotate/php_bug_65070.c @@ -1,35 +1,33 @@ -/**
- * Regression test for <https://github.com/libgd/libgd/issues/319>
- *
- * We're testing that the rotated image actually has the requested background
- * color.
- */
-
-
-#include "gd.h"
-#include "gdtest.h"
-
-
-int main()
-{
- gdImagePtr src, dst;
- FILE *fp;
- int black;
- char *path;
-
- fp = gdTestFileOpen2("gdimagerotate", "php_bug_65070.gif");
- src = gdImageCreateFromGif(fp);
- fclose(fp);
-
- black = gdImageColorAllocateAlpha(src, 0, 0, 0, 0);
- dst = gdImageRotateInterpolated(src, 30.0, black);
-
- path = gdTestFilePath2("gdimagerotate", "php_bug_65070_exp.png");
- gdAssertImageEqualsToFile(path, dst);
- gdFree(path);
-
- gdImageDestroy(src);
- gdImageDestroy(dst);
-
- return gdNumFailures();
-}
+/** + * Regression test for <https://github.com/libgd/libgd/issues/319> + * + * We're testing that the rotated image actually has the requested background + * color. + */ + +#include "gd.h" +#include "gdtest.h" + +int main() +{ + gdImagePtr src, dst; + FILE *fp; + int black; + char *path; + + fp = gdTestFileOpen2("gdimagerotate", "php_bug_65070.gif"); + src = gdImageCreateFromGif(fp); + fclose(fp); + + black = gdImageColorAllocateAlpha(src, 0, 0, 0, 0); + dst = gdImageRotateInterpolated(src, 30.0, black); + + path = gdTestFilePath2("gdimagerotate", "php_bug_65070_exp.png"); + gdAssertImageEqualsToFile(path, dst); + gdFree(path); + + gdImageDestroy(src); + gdImageDestroy(dst); + + return gdNumFailures(); +} |