blob: f1b55043fb83bbadd2c65bb1525924aa23c62472 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
/**
* 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();
}
|