[Bioperl-l] problems iwth Bio::graphics module
chen li
chen_li3 at yahoo.com
Tue May 23 13:27:06 UTC 2006
Dear Dr. Logghe,
Thank you so much. I have the script worked after
getting your suggestion under Cygwin. Here are the
last two lines:
either binmode (STDOUT);
print STDOUT $panel->png;
or only print STDOUT $panel->png;
They both work for me. I know the default output in
perl to the screen. I don't why it works if STDOUT
after print is added. Could you explain it?
BTW I copy this script from GraphicsHowTo on Bioperl
website and only one line contains print statement,
which is 'print $panel->png'.
Once again thank you so much,
Li
--- Marc Logghe <Marc.Logghe at devgen.com> wrote:
> Hi Li,
> Did you check your script for any other print
> statements (to STDOUT,
> that is) that potentially could contaminate your png
> stream ?
>
> Marc
>
>
> > -----Original Message-----
> > From: bioperl-l-bounces at lists.open-bio.org
> > [mailto:bioperl-l-bounces at lists.open-bio.org] On
> Behalf Of chen li
> > Sent: Tuesday, May 23, 2006 12:58 AM
> > To: Torsten Seemann
> > Cc: bioperl-l at lists.open-bio.org
> > Subject: Re: [Bioperl-l] problems iwth
> Bio::graphics module
> >
> > 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
> > _______________________________________________
> > Bioperl-l mailing list
> > Bioperl-l at lists.open-bio.org
> >
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
> >
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>
__________________________________________________
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