From: Eric Peden Date: 2005-03-01T07:41:40+09:00 Subject: Re: Rendering ruby openGL output to a file. On Feb 28, 2005, at 11:25 AM, Ruby NNTP->SMTP Gate wrote: >> 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 I stand corrected. #constitute even scales floats to the correct range automatically; this should help tidy up some of my code quite nicely. #constitute should probably appear under store_pixel's "See also" in the docs. I've always thought the xMagick libraries had rather poorly named functions: heavy cross-linking makes it easier to find the tools you never knew you needed. Thanks for the pointer. -- eric