From: "Ruby NNTP->SMTP Gate" Date: 2005-03-01T02:25:37+09:00 Subject: ) by lamb.sas.com (unknown) with NNTP id 127567 for ; To: ruby-talk@ruby-lang.org Path: zrz.TU-Berlin.DE!news-ber1.dfn.de!news-stu1.dfn.de!news.belwue.de!feed.news.tiscali.de!uninett.no!newsfeed1.eu.ignite.net!attws1!ip.att.net!lamb.sas.com!newshost!not-for-mail From: Tim Hunter Newsgroups: comp.lang.ruby Subject: Re: Rendering ruby openGL output to a file. Date: Mon, 28 Feb 2005 11:29:53 -0500 Organization: SAS Institute, Inc. Lines: 23 Message-ID: References: <7993c66305022803267f2b7930@mail.gmail.com> NNTP-Posting-Host: d14087.na.sas.com Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: license1.unx.sas.com 1109608192 282 10.20.11.78 (28 Feb 2005 16:29:52 GMT) X-Complaints-To: usenet@unx.sas.com NNTP-Posting-Date: 28 Feb 2005 16:29:52 GMT User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en In-Reply-To: Xref: zrz.TU-Berlin.DE comp.lang.ruby:127567 Received: from Usenet via a Usenet to mail gateway located at TU-Berlin.DE. This service provided as a courtesy to the ruby-talk mailing list. If this message is SPAM, its ultimate origin is Usenet, not this gateway program. All subscribers to the ruby-talk mailing list agree to receive the Usenet postings made to comp.lang.ruby via this gateway. Please see http://www.ruby-lang.org/ruby-talk-usenet-policy.html. X-From-Usenet: see Received: header above. X-rubymirror: yes Eric Peden wrote: > On Feb 28, 2005, at 5:26 AM, Brian Schr�der wrote: > >> ow I want to include the images into >> my thesis, and I'd like to use a higher resolution that what my screen >> can give. Is it possible to render the image not onto the screen, but >> into a file, using a bigger-than-screen resolution? I'm quite an >> opengl newbie so maybe this is obious? > > > You might get some use out of RMagick, a Ruby interface for > ImageMagick/GraphicsMagick: > > http://rmagick.rubyforge.org/ > > The OpenGL API works with raw color values packed into an array; RMagick > (as far as I can tell) cannot. You should be able to draw your scene > offscreen, then do a readPixels() and then convert the resulting array > to RMagick Pixel values. Tell RMagick what your intended resolution is, > and it will handle the rest. > The #constitute method takes an array of RGBA values as input: http://www.simplesystems.org/RMagick/doc/image1.html#constitute