mini_magick stdout

K

Kyle Hunter

Hello,

I'm using mini_magick to interface imagemagick. My script runs on win32
through rubyw.exe. Unfortunately, everytime mini_magick performs an
operation a command prompt pops up. I've already tried specifying
$stdout = $stderr = File.new("stdout.log", "w")
But it still pops up.

How can I suppress these command prompts?
 
P

p. Corey

How can I suppress these command prompts?
I can help you out since I wrote it. We should probably move the
conversation over to http://rubyforge.org/projects/mini-magick
though.
What command are you running through mini_magick?
Since mini_magick just sends out shell commands to imagemagick I would
first try and directly run the commands through imagemagick like
`mogrify -resize 256x256 *.jpg` to see if it is a imagemagick problem.

Corey
 
K

Kyle Hunter

p. Corey said:
first try and directly run the commands through imagemagick like
`mogrify -resize 256x256 *.jpg` to see if it is a imagemagick problem.

Yes, using `mogrify -resize 256x256 *.jpg` produces a command prompt,
just as using mini_magick did.
 
J

James Tucker

Yes, using `mogrify -resize 256x256 *.jpg` produces a command prompt,
just as using mini_magick did.

In which case try adding redirection e.g. > NUL, or to file, as
appropriate. You might need to do stderr too.
 
K

Kyle Hunter

Let me add a clarification.

I run it through rubyw.exe with no command prompt at all. (I use Ruby
one-click installer, and open it). The command prompts that pop up
per-operation almost instantly disappear. If I run rubyw.exe through a
command prompt and leave it open for the operations of my script, the
per-operation command prompts that open and close quickly do not come
up.

How can I redirect it to >NUL without opening it in a command prompt?
 
J

James Tucker

You could checkout various things in cmd.exe, and start.exe (help cmd,
help start, in the command prompt)

I'm certain there's a way, but I can't remember the specifics off of
the top of my head, sorry.

Also, don't forget, it's not just stdout, but stderr :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,161
Messages
2,570,891
Members
47,423
Latest member
henerygril

Latest Threads

Top