From: Tom Copeland Date: 2005-04-04T23:46:16+09:00 Subject: Re: Extension question On Mon, 2005-04-04 at 23:19 +0900, Joe Van Dyk wrote: > Hi, > > I'm generating a fairly large image file (can be 10000x10000) pixels > by reading some binary data and setting each pixel. As you can > imagine, pure Ruby is REALLY slow, I think because of the loops. I've > written the program in C and it's literally hundreds to thousands of > times faster (depending on image size). > > So, I'd like to write my first C extension. I'm using the GD library > for image manipulation. You might be interested in this: http://raa.ruby-lang.org/list.rhtml?name=ruby-gd >From the example scripts: require "GD" im = GD::Image.new(100,100) red = im.colorAllocate(255,0,0) im.rectangle(0,0,99,99,red) im.png STDOUT Yours, tom