Mini_magick stdout

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?


Thanks, Kyle ‘Phenax’ Hunter
http://keletech.org/blog/

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

p. Corey wrote:

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.

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?

On 3 Apr 2008, at 17:29, Kyle H. wrote:

p. Corey wrote:

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.

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

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 :slight_smile:

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs