chrono86 has asked for the wisdom of the Perl Monks concerning the following question:
If you know how fly works, if you don't specify an input file it takes its input from STDIN. If you don't specify an output file it sends its output to STDOUT. If you specify the -q option it works quietly. When it sends the image information to STDOUT, it doesn't send it in binary mode as i specified. If anyone could help me in understanding why, i would really appreciate it. Thanks!#!D:\perl\bin $flyprog = "D:\\fly\\fly.exe"; print "Content-type: image/png\n\n"; binmode(STDOUT); open(FLY,"| $flyprog -q "); print FLY "new\n"; print FLY "size 256,256\n"; print FLY "type png\n"; print FLY "fill 1,1,255,255,255\n"; print FLY "circle 128,128,180,0,0,0\n"; print FLY "fill 128,128,255,255,0\n"; print FLY "arc 128,128,120,120,0,180,0,0,0\n"; print FLY "circle 96,96,10,0,0,0\n"; print FLY "circle 160,96,10,0,0,0\n"; print FLY "fill 96,96,0,0,0\n"; print FLY "fill 160,96,0,0,0\n"; close(FLY);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using FLY to print to STDOUT
by dws (Chancellor) on Oct 04, 2002 at 01:55 UTC | |
|
Re: Using FLY to print to STDOUT
by vek (Prior) on Oct 04, 2002 at 02:57 UTC | |
by chrono86 (Novice) on Oct 05, 2002 at 02:25 UTC | |
by vek (Prior) on Oct 05, 2002 at 17:03 UTC | |
|
Re: Using FLY to print to STDOUT
by helgi (Hermit) on Oct 04, 2002 at 09:59 UTC |