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.139.87.151


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

#include <stdio.h>
#include "gd.h"
#include "gdtest.h"

int main()
{
	gdImagePtr im;
	int bordercolor, color;

	im = gdImageCreateTrueColor(100, 100);

	gdImageAlphaBlending(im, 1);
	gdImageSaveAlpha(im, 1);
	bordercolor = gdImageColorAllocateAlpha(im, 0, 0, 0, 2);
	color = gdImageColorAllocateAlpha(im, 0, 0, 0, 1);

	gdImageFillToBorder(im, 5, 5, bordercolor, color);

	color = gdImageGetPixel(im, 5, 5);

	gdImageDestroy(im);
	if (gdTestAssert(color==0x1000000)) {
		return 0;
	} else {
		gdTestErrorMsg("c: %X, expected %X\n", color, 0x1000000);
		return -1;
	}

}