bug39273.phpt 656 B

1234567891011121314151617181920212223242526272829
  1. --TEST--
  2. Bug #37360 (gdimagecreatefromgif, bad image sizes)
  3. --EXTENSIONS--
  4. gd
  5. --FILE--
  6. <?php
  7. $small = imagecreatetruecolor(10, 10);
  8. $c1 = imagecolorallocatealpha($small, 255,0,0,50);
  9. imagecolortransparent($small, 0);
  10. imagealphablending($small, 0);
  11. imagefilledrectangle($small, 0,0, 6,6, $c1);
  12. $width = 300;
  13. $height = 300;
  14. $srcw = imagesx($small);
  15. $srch = imagesy($small);
  16. $img = imagecreatetruecolor($width, $height);
  17. imagecolortransparent($img, 0);
  18. imagealphablending($img, false);
  19. imagecopyresized($img, $small, 0,0, 0,0, $width, $height, $srcw, $srch);
  20. imagesavealpha($img, 1);
  21. $c = imagecolorat($img, 0,0);
  22. printf("%X", $c);
  23. ?>
  24. --EXPECT--
  25. 32FF0000