From: ara.t.howard@... Date: 2006-11-17T07:48:22+09:00 Subject: Re: Another IO.popen question ... On Fri, 17 Nov 2006, Adam Groves wrote: > Hi Joel, > > thanks for the speedy reply! The problem is, I need to pass on a file > object (which has been uploaded from a web page form) to 'convert' and > not just a path. I should have made this clearer in my original post. > > Any ideas? you can pass convert files on stdin. you need somthing like stdin = file_object.read cmd = " convert - png:- " # input on stdin, output to stdout stdout = IO.popen( cmd, 'r+' ) do |pipe| pipe.write stdin pipe.close_write pipe.read end abort "cmd <#{ cmd }> failed" unless $? == 0 open the_png, 'w' do |f| f.write stdout end regards. -a -- my religion is very simple. my religion is kindness. -- the dalai lama