> Hi: Hi. I'm author of Gimp-Ruby. > What I need is a command line method > of generating a solid color rectangle > (with a drop shadow) and to specify > a font, font size and text in the > rectangle. I am building a web page > and it would be nice to have the graphics > in part of the make system. You can use Gimp functions via dRuby. But since Gimp-Ruby isn't designed to be used from other application, the way is a bit ugly. And you need CVS version of drb. http://www.ruby-lang.org/~knu/cgi-bin/cvsweb.cgi/lib/drb/ 1. start up gimp and dRuby server (its menu path is <Toolbox>/Xtns/Ruby-Fu/dRuby Server/Start...) BTW you can start up them from command-line like % gimp --no-interface --batch '(ruby-fu-druby-server 1 "druby://:7950" "")' 2. Then you can use gimp procedures via dRuby. Following is an example. require 'gimp/base' require 'drb/drb' DRb.start_service(nil, nil) g = DRbObject.new(nil, 'druby://:7950') width = 100 height = 100 old_fg = g.gimp_palette_get_foreground old_bg = g.gimp_palette_get_background img = g.gimp_image_new(width, height, Gimp::RGB) begin img.undo_disable # equivalent to g.gimp_image_undo_disable(img) d = g.gimp_layer_new(img, width, height, Gimp::RGBA_IMAGE, "Background", 100, Gimp::NORMAL_MODE) img.add_layer(d, -1) # equivalent to g.gimp_image_add_layer(img, d, -1) g.gimp_palette_set_background(Gimp::Color.new(255,255,255)) g.gimp_edit_fill(d, Gimp::BG_IMAGE_FILL) d = g.gimp_layer_new(img, width, height, Gimp::RGBA_IMAGE, "BoxLayer", 100, Gimp::NORMAL_MODE) img.add_layer(d, -1) g.gimp_drawable_fill(d, Gimp::TRANS_IMAGE_FILL) g.gimp_rect_select(img, width/4, height/4, width/2, height/2, Gimp::ADD, false, 0) g.gimp_palette_set_foreground(Gimp::Color.new(0,0,255)) g.gimp_bucket_fill(d, Gimp::FG_BUCKET_FILL, Gimp::NORMAL_MODE, 100, 0, false, 0, 0) g.gimp_selection_none(img) #g.script_fu_drop_shadow(Gimp::RUN_NONINTERACTIVE, img, d, "8", "8", "5.0", # Gimp::Color.new(0,0,0), "70", true) img.active_layer = d g.gimp_palette_set_foreground(Gimp::Color.new(255, 0, 0)) d = g.gimp_text_fontname(img, nil, width/4, height/4, "Ruby!", 0, true, 15, Gimp::PIXELS, "-adobe-utopia-medium-r-normal-*-*-*-*-*-p-*-*") img.flatten # equivalent to g.gimp_image_flatten(img) filename = '/home/susho/my_src/hoge.bmp' g.file_bmp_save(Gimp::RUN_NONINTERACTIVE, img, img.active_drawable, filename, filename) ensure img.delete # equivalent to g.gimp_image_delete(img) g.gimp_palette_set_background(old_bg) g.gimp_palette_set_foreground(old_fg) end There are many many proedures provided by the gimp. DB Browser (<Toolbox>Xtns/DB Browser...) will be your help for searching functions. Hope this helps, -- Masahiro P.S. My English may not be polite. If it's so, please take it as polite one. I have never lived in English-spoken countries. So I don't know how to express in English well.