From: Osuka Adartse Date: 2004-01-28T10:28:17+09:00 Subject: Re: Editor Safran von Twesla wrote: > On Wed, 28 Jan 2004 03:13:51 +0900, Osuka Adartse > wrote: > > > >>regarding GD lib, I'm on windows haven't got a problem using it, are you >>using the pragprog ruby install? mingw? I use the later, didn't tried >>compiling gd myself, got the binary from the /binaries/mingw|mswin/ext >>folder in a mirror >>for mingw >>http://www.ibiblio.org/pub/languages/ruby/binaries/mingw/1.8/ext/ruby-GD-0.7.4-i386-mingw32-1.8.tar.gz >> >>for mswin didn't see one, but most probably the mingw would work with >>the mswin install(but I could be wrong), just unpack the GD.so to the >>right dir i.e. ruby/lib/1.8/i386-msvcrt , the i386-msvcrt could be >>different on mswin install, just look where the other *.so are. >> >>and thats if using ruby-GD, see: >>http://raa.ruby-lang.org/cat.rhtml?category_major=Library;category_minor=Graphics > > > > He inserted GD.so in C:\ruby\lib\ruby\1.8\i386-mswin32 and run his > Script again... here the error: ms-win32?, the pragprog doesn't create a /*mswin but /*msvcrt? or is a newer version? or is he using other windows binary? > > test.rb:62: undefined method `colorAllocate' for > # (NoMethodError) > > Strange, isn't it? > > Thx > > SvT I Installed the ruby-180-10, just to check it out and using the example.rb: ----------------------------------------- require 'GD' im=GD::Image.new(100,100) white = im.colorAllocate(255,255,255) black = im.colorAllocate(0,0,0) red = im.colorAllocate(255,0,0) blue = im.colorAllocate(0,0,255) im.transparent(white) im.interlace = true # Put a black frame around the picture im.rectangle(0,0,99,99,black) # Draw a blue oval im.arc(50,50,95,75,0,360,blue) # And fill it with red im.fill(50,50,red) # Convert the image to PNG and print it on standard output file=File.new("test.png","wb") im.png(file) ----------------------------------------- I get the test.png ok!, both with the mingw install and the mswin(pragprog), mmmh... is other mswin install, self compiled? run the line *require 'GD'* does it gives an error by itself? Adartse smoking kills, living kills, but I like both.