Subject: | Diagram.pm: BINMODE missing in printing of graphic file. |
Show quoted text
---BINMODE missing in printing of graphic file---
After line 511 in Diagram.pm, there should be a "binmode $fh;", as I have added below. Without this, the graphic files are naughty.
#
# Print the image.
#
if ( $out_file ) {
open my $fh, ">$out_file" or die "Can't write '$out_file': $!\n";
binmode $fh;
print $fh $gd->$output_type;
close $fh;
}
else {
return $gd->$output_type;
}