#!/usr/local/bin/ruby # # ./image_new.rb > image_new.gif require "GD" # create a new image im = GD::Image.new(200, 200) # allocate some colors white = im.colorAllocate(255,255,255) black = im.colorAllocate(0,0,0) red = im.colorAllocate(255,0,0) green = im.colorAllocate(0,255,0) blue = im.colorAllocate(0,0,255) yellow = im.colorAllocate(255,250,205) im.gif STDOUT