From: "A.S. Bradbury" Date: 2007-02-25T08:28:50+09:00 Subject: Re: Lightweight way to create jpeg files? On 2/24/07, Mike Nelson wrote: > Is there an easy lightweight way to dynamically create jpeg files? I > think RImageMagick could do this but it seems like it's loaded with > dependences. > > Ideally I'd like to send an Array of lines with color values to be > written out to a jpeg. It wouldn't have to support options for encoding. > > I'm thinking might go to bmp because I think it may be straightforward > enough to roll my own simple class for this. I'd prefer jpeg and I'm not > sure if I want to spend the time writing something for encoding a jpeg. > > Thanks, > Mike From the sound of what you're doing, it sounds like PNG may be more suitable than JPEG (but maybe I'm making an invalid assumption here). Try gem install png. It's a pure-ruby png library from seattle.rb. Take a look at the rdoc using gem_server and you're good to go. This definitely handles your dependency worries. If performance should prove to be a problem then you might try imlib2-ruby. Alex