[Bioperl-l] problems iwth Bio::graphics module

chen li chen_li3 at yahoo.com
Mon May 22 22:57:42 UTC 2006


Hi,

I try both: either with or without this statement 
 binmode(STDOUT) before the last line print
$panel->png; But there are no differenes. I get a file
of 2432 bytes.

Li



> Chen Li
> 
> >  perl render_blast1.pl data1.txt >im.png
> 
> Based on http://bioperl.org/wiki/HOWTO:Graphics I
> believe the example 
> script is creating a PNG image. The last line is:
> print $panel->png;
> 
> > and Perl runs without any problem. I use adobe
> > photoshop to open them and Adobe can't recognize
> them.
> > If I use ACDSee to open them I only get a black
> > background. If I issue this line under Cygwin X
> window
> > display im.png  or display im.gif
> > Cygwin says:
> > display: Improper image header `im.png'.
> > It seems Perl can't produce an image with right
> > format.
> 
> Are you sure Perl is producing a PNG file at all?
> How many bytes does im.png use? Zero?
> 
> Did you notice this in
> http://bioperl.org/wiki/HOWTO:Graphics ?
> 
> It says: "If you are on a Windows platform, you need
> to put STDOUT into 
> binary mode so that the PNG file does not go through
> Window's carriage 
> return/linefeed transformations. Before the final
> print statement, put 
> the statement binmode(STDOUT)."
> 
> ie. your script should have
> 
> binmode(STDOUT);
> print $panel->png;
> 
> as the last 2 lines.
> 
> > Do you experience the same problem before?
> 
> No.
> 
> --Torsten
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the Bioperl-l mailing list