http://www.perlmonks.org?node_id=572236


in reply to Re: CGI-Perl:: Location for saving the GD output
in thread CGI-Perl:: Location for saving the GD output

Dear Shmem,

I tried the third one.. and is giving output but not as image.. its all Greek and Latin..

Below are the lines of code, where I am generating the image..
my $png_data = $im->png; #open (DISPLAY,"| display -") || die; print $query->p("$tag : Free energy curve of forward strand and shu +ffle sequence"); #open (DISPLAY,">/var/www/html/upload/$tag.jpg") ||error ($query, "C +ant open GRAPH:") ; open (DISPLAY,">/tmp/upload/$tag.jpg") ||error ($query, "Cant open +GRAPH:") ; binmode DISPLAY; print DISPLAY $png_data; close DISPLAY;
and just to try with your piece of code, I am trying with this.
open (I, '<', "/tmp/upload/$tag.jpg"); #print $query->header(-content_type => "image/png"); print while <I>; close I; exit;
What u say ?? pl help!!