[Bioperl-l] problem with Graphics

Wes Barris wes.barris at csiro.au
Thu Aug 14 23:54:44 EDT 2003


Sean O'Brien wrote:

> Hi,
> 
> I have been trying to get BioPerl to output png's, but I seem to be getting 
> invalid png files.  I have a fresh install of libgd, version 2.0.15 and my GD 
> version is 2.07.  I installed Bundle::BioPerl, and after having no luck, I 
> installed BioPerl version 1.2.2 from the sources in 
> current_core_stable.tar.gz.  When I run 'make test' I get an ok for 
> BioGraphics.  Also, when I run the first script described in the Bio Graphics 
> tutorial, it runs with no errors and outputs some data which appears as 
> though it could be an image.  However, the file seems to be of an invalid png 
> format because it cannot be opened by display, galeon or the GIMP.  This is 
> pretty frustrating because everything apears to be installing/running fine, 
> but then the image is somehow corrupted.  What might I have done wrong/ need 
> to do to make this work.  Thanks.

Hi Sean,

The examples that output png files never worked for me either.  To fix them,
I changed this line:

print $panel->png;

to something like this:

open(OUT, ">junk.png");
binmode OUT;
print OUT $panel->png;
close(OUT);
print("Wrote junk.png\n");

-- 
Wes Barris
E-Mail: Wes.Barris at csiro.au



More information about the Bioperl-l mailing list