Commits

Pierre Joye  committed b10c776

simplify and fix test

  • Participants
  • Parent commits 1e09060

Comments (0)

Files changed (2)

File tests/gdimagerotate/php_bug_64898.c

 		return 1;
 	}
 
-	im = gdImageCreateFromPng(fp);
-
-	fclose(fp);
+	im = gdImageCreateTrueColor(141, 200);
 
 	if (!im) {
 		gdTestErrorMsg("loading %s failed.\n", path);
 		return 1;
 	}
 
-	color = gdImageColorAllocate(im, 255, 255, 255);
-
-	if (color < 0) {
-		gdTestErrorMsg("allocation color from image failed.\n");
-		gdImageDestroy(im);
-		return 1;
-	}
+	gdImageFilledRectangle(im, 0, 0, 140, 199, 0x00ffffff);
 
 /*	Try default interpolation method, but any non-optimized fails */
 /*	gdImageSetInterpolationMethod(im, GD_BICUBIC_FIXED); */
 
-	exp = gdImageRotateInterpolated(im, 45, color);
+	exp = gdImageRotateInterpolated(im, 45, 0x0);
 
 	if (!exp) {
 		gdTestErrorMsg("rotating image failed.\n");

File tests/gdimagerotate/php_bug_64898_exp.png

Old
Old image
New
New image