my $png_data = $im->png; #open (DISPLAY,"| display -") || die; print $query->p("$tag : Free energy curve of forward strand and shuffle sequence"); #open (DISPLAY,">/var/www/html/upload/$tag.jpg") ||error ($query, "Cant open GRAPH:") ; open (DISPLAY,">/tmp/upload/$tag.jpg") ||error ($query, "Cant open GRAPH:") ; binmode DISPLAY; print DISPLAY $png_data; close DISPLAY; #### open (I, '<', "/tmp/upload/$tag.jpg"); #print $query->header(-content_type => "image/png"); print while ; close I; exit;