From: Nuno Lopes Date: Sat, 22 Jul 2006 15:15:53 +0000 (+0000) Subject: dont create images in the php source root. output them instead X-Git-Tag: php-5.2.0RC1~24 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5e7efb5ec9de2669701ba82b0f20c92176f9ae10;p=php dont create images in the php source root. output them instead --- diff --git a/ext/gd/tests/dashedlines.phpt b/ext/gd/tests/dashedlines.phpt index 30db8f1c71..27e32d925b 100644 --- a/ext/gd/tests/dashedlines.phpt +++ b/ext/gd/tests/dashedlines.phpt @@ -45,7 +45,11 @@ $p3 = imagecolorat($im, 2,2) == $r; $p4 = imagecolorat($im, 2,3) == $b; $p5 = imagecolorat($im, 2,4) == $r; $p6 = imagecolorat($im, 2,5) == $b; -imagepng($im, 'b.png'); + +ob_start(); +imagepng($im); +echo base64_encode(ob_get_clean()), "\n"; + if ($p1 && $p2 && $p3 && $p4 && $p5 && $p6) { echo "Vertical: ok\n"; } @@ -75,5 +79,6 @@ imagedestroy($im); ?> --EXPECTF-- Horizontal: ok +iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAIAAABvrngfAAAAJ0lEQVQImWP8//8/AwMDAyMjA4TBwMAEoRgZoHyE0H8GRnQh0lUBABMDCgml3gqkAAAAAElFTkSuQmCC Vertical: ok Diagonal: ok diff --git a/ext/gd/tests/lines.phpt b/ext/gd/tests/lines.phpt index 8f64e12aee..56358a62bb 100644 --- a/ext/gd/tests/lines.phpt +++ b/ext/gd/tests/lines.phpt @@ -61,7 +61,10 @@ for ($y=1; $y<5; $y++) { if ($p1 && $p2 && $p3) { echo "Diagonal: ok\n"; } -imagepng($im, 'a.png'); + +ob_start(); +imagepng($im); +echo base64_encode(ob_get_clean()), "\n"; // Outside @@ -112,5 +115,6 @@ Warning: Wrong parameter count for imageline() in %s on line %d Horizontal: ok Vertical: ok Diagonal: ok +iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAIAAABvrngfAAAAK0lEQVQImV3JsQ0AMAwCwYf9dyZFJOyE5qVDhBDWHCL0EPCpb7a6Z3WoegA14w0JDJlWpgAAAABJRU5ErkJggg== Outside 1: ok Outside 2: ok