1. libgd
  2. Untitled project
  3. gd-libgd

Source

gd-libgd / tests / gdimagecopy / bug00007.c

pajoye 9bf4f83 

Takeshi Abe 804e369 
pajoye 9bf4f83 




pierrejoye e20413b 
tabe 535eab5 
pajoye 9bf4f83 



tabe 535eab5 
pajoye 9bf4f83 







Ondřej Surý 6cc113c 
pajoye 9bf4f83 
pierrejoye e20413b 

pajoye 9bf4f83 

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

#include "gdtest.h"

int main()
{
	gdImagePtr dst_tc, src;
	int c1;

	src = gdImageCreate(5,5);
	gdImageAlphaBlending(src, 0);

	gdImageColorAllocate(src, 255,255,255); /* allocate white for background color */
	c1 = gdImageColorAllocateAlpha(src, 255,0,0,70);

	gdImageFilledRectangle(src, 0,0, 4,4, c1);

	dst_tc  = gdImageCreateTrueColor(5,5);
	gdImageAlphaBlending(dst_tc, 0);
	gdImageCopy(dst_tc, src, 0,0, 0,0, gdImageSX(src), gdImageSY(src));

	/* CuAssertImageEquals(tc, src, dst_tc); */

	/* Destroy it */
	gdImageDestroy(dst_tc);
	gdImageDestroy(src);
	return 0;
}