Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: STDOUT buffering problem

by illtud (Initiate)
on Apr 16, 2013 at 14:47 UTC ( [id://1028936]=note: print w/replies, xml ) Need Help??


in reply to Re: STDOUT buffering problem
in thread STDOUT buffering problem

MAGICK_THREAD_LIMIT to 1. Could be that may help.

Good idea! Nope, no different. Setting to 0 doesn't help either.

Replies are listed 'Best First'.
Re^3: STDOUT buffering problem
by illtud (Initiate) on Apr 16, 2013 at 16:43 UTC

    OK, for a quick fix I rewrote it to output the image data to temporary files (in the full script there's an image for each of the CMY layers) and then write those out to stdout.

    I couldn't work out from Image::Magick how to get the binary data out using GetPixels to match the binary data that I got from writing out the files, at some point I'll go and ask the ImageMagick list and that will let me do without the temporary files.

    Thanks for your replies, this one was a puzzler to me, but I'm no perl guru! This is a snippet of what worked for me:

    ... binmode STDOUT; $yellow->Write('gray:/tmp/yellow'); open(FIN,"</tmp/yellow") || die("cannot access file /tmp/yellow\n"); while (sysread FIN, $buffer, 4096) { print $buffer; } close FIN; print("\r"); ...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1028936]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (3)
As of 2024-04-25 09:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found