code
---------------------------------------------------------------------------
$y3 = array( <2000 values from MySQL resulta formatted> );
//set positions and draw image
$pos1 = 225;
$pos2 = 226;
$pic=ImageCreate(2290,50);
$col1=ImageColorAllocate($pic,200,200,200);
foreach ($y3 as $val)
{
unset( $color );
$color = ( 255 - $val);
//$color = $value;
$col=ImageColorAllocate($pic,$color,$color,$color);
Imageline($pic,$pos1,6,$pos1,44,$col);
$pos1++;
}
ImagePNG($pic,"../images/bar$ID.png");
ImageDestroy($pic);
I've check the array for min,max and number of values and the array data is great. It starts drwing the image which consists of a gray background and a line being drawn for each value as it loop though the 2000 values in the array, each having a different color value and a position that places the each line next to the last generates the correct Imageline() statement on the fly.
Here's the problem, after about drawing 250 or so line objects, it stops drawing the values and I get nothing but gray or white for the rest of the image. I reduced the dataset to 400 values to test this and I get the same result.
Is there a limitation in GD or PHP that would cause this or is there an error in my code. I've attached copies of the images that PHP is generating so you can see what is happening. These images contain the curve and two images PHP draws, the first is a line graph from JPGraph showing the curve and the second is the gel image below the graph. The gel image in the fingerprint I am having trouble with. Both example stop generating line objects after about 250 lines as seen in the examples.
Attachments:
sample1.gif --> zoom in of first 400 points of sample in sample2.gif containing only 400 values
sample2.gif --> entire DNA fingerprint of 2000 values
My configuration is:
Red Hat 7.3 with all current updates for that release apache 1.3 and PHP 4.1.2
Any ideas on how to get this to work properly?
Thanks in advance for your help and advise!
Robert Trembath
CSE
e| robert@bacbarcodes.com
Bacterial BarCodes, Inc.
Houston, TX
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php