[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

mini_magick stdout

Kyle Hunter

4/3/2008 1:33:00 PM

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...
--
Posted via http://www.ruby-....

5 Answers

p. Corey

4/3/2008 3:22:00 PM

0

> 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/m...
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

Kyle Hunter

4/3/2008 4:29:00 PM

0

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.

--
Posted via http://www.ruby-....

James Tucker

4/3/2008 4:43:00 PM

0


On 3 Apr 2008, at 17:29, Kyle Hunter 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.

>
>
> --
> Posted via http://www.ruby-....
>


Kyle Hunter

4/3/2008 5:25:00 PM

0

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?
--
Posted via http://www.ruby-....

James Tucker

4/4/2008 8:56:00 AM

0

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

On 3 Apr 2008, at 18:25, Kyle Hunter wrote:
> 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?
> --
> Posted via http://www.ruby-....
>