0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 3.14.130.58


Current Path : /var/www/html/suk_discontinued/libgd-gd-2.2.3/tests/gdimagecopyrotated/
Upload File :
Current File : /var/www/html/suk_discontinued/libgd-gd-2.2.3/tests/gdimagecopyrotated/bug00020.c

#include "gd.h"
#include "gdtest.h"

#define width 50

int main()
{
	gdImagePtr im, im2;
	int error = 0;
	char *path;

	im = gdImageCreateTrueColor(width, width);
	gdImageFilledRectangle(im, 0,0, width, width, 0xFF0000);
	gdImageColorTransparent(im, 0xFF0000);
	gdImageFilledEllipse(im, width/2, width/2, width - 20, width - 10,
	                     0x50FFFFFF);

	im2 = gdImageCreateTrueColor(width, width);

	gdImageCopyRotated(im2, im, width / 2, width / 2, 0,0, width, width, 60);
	path = gdTestFilePath2("gdimagecopyrotated", "bug00020_exp.png");
	if (!gdAssertImageEqualsToFile(path, im2)) {
		error = 1;
	}

	gdImageDestroy(im2);
	gdImageDestroy(im);
	free(path);
	return error;
}