Problem w/ generating png on Linux with more than 250 objects ona single graphic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have an application that records DNA fingerprints(gel images) in digital form in a MySQL Database. Each fingerprint consists of an array of 2000 values between 0-255 that represent a grayscale color. I use the code below to create an image or fingerprint from the data.

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

[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux