Image Processing Questions

I've been digging around trying to find a good hook for GD and so far I've
found

Gruby (1): http://raa.ruby-lang.org/project/gruby/
Gruby (2): http://gruby.sourceforge.jp/index.en.html#download
Ruby-gd: http://raa.ruby-lang.org/project/ruby-gd/
GD2: http://rubyforge.org/projects/gd2/

GD2 seems to be the most-current with the file date of March 4, 2006.
However, when I run 'gem install GD2' I get some strange errors along with
when I try to require GD2.

C:\Documents and Settings\Mike>gem install gd2
Attempting local installation of 'gd2'
Local gem file not found: gd2*.gem
Attempting remote installation of 'gd2'
Updating Gem source index for: http://gems.rubyforge.org
Successfully installed gd2-1.1
Installing RDoc documentation for gd2-1.1...

lib/gd2/image.rb:681:25: ':' not followed by identified or operator
lib/gd2/palette.rb:55:40: ':' not followed by identified or operator
lib/gd2/palette.rb:93:28: ':' not followed by identified or operator
lib/gd2/palette.rb:94:30: ':' not followed by identified or operator
lib/gd2/palette.rb:95:29: ':' not followed by identified or operator
lib/gd2/palette.rb:96:30: ':' not followed by identified or operator
lib/gd2/palette.rb:97:29: ':' not followed by identified or operator
lib/gd2/palette.rb:189:28: ':' not followed by identified or operator
lib/gd2/palette.rb:190:30: ':' not followed by identified or operator
lib/gd2/palette.rb:191:29: ':' not followed by identified or operator
lib/gd2/palette.rb:192:30: ':' not followed by identified or operator

C:\Documents and Settings\Mike>irb
irb(main):001:0> require 'GD2'
RuntimeError: unknown error
        from C:/Program
Files/ruby/lib/ruby/gems/1.8/gems/gd2-1.1/lib/gd2.rb:29:in `initialize'
        from C:/Program
Files/ruby/lib/ruby/gems/1.8/gems/gd2-1.1/lib/gd2.rb:29
        from C:/Program
Files/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'

        from C:/Program Files/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:182:in
`activate'
        from C:/Program Files/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:181:in
`activate'
        from C:/Program
Files/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:26:in `require'

        from (irb):1
irb(main):002:0>

(condensed some whitespace)

What I'm wondering is

1) What do people use for image processing? I've always used GD when I was
using PHP and it's just "what I'm used to". I'm not really married to any
particular library as long as it has all of the functionality that GD has.

2) Does anyone have any idea what went wrong with my GD gem install? I tried
this on two XP sp2 systems and it yielded the same exact result (wanted to
be sure it wasn't a localized problem). I also get the same results when I
require GD2 on both machines (the other machine has Ruby installed to
C:\ruby - so I know the path in the example above isn't an issue).

Any insight is greatly appreciated!

Thanks

-M

Seems like a bug in GD2. Have you looked at line 29 of
C:/Program Files/ruby/lib/ruby/gems/1.8/gems/gd2-1.1/lib/gd2.rb
?

···

On May 10, 2006, at 9:37 AM, Mike Brum wrote:

I've been digging around trying to find a good hook for GD and so far I've
found

Gruby (1): http://raa.ruby-lang.org/project/gruby/
Gruby (2): http://gruby.sourceforge.jp/index.en.html#download
Ruby-gd: http://raa.ruby-lang.org/project/ruby-gd/
GD2: http://rubyforge.org/projects/gd2/

GD2 seems to be the most-current with the file date of March 4, 2006.
However, when I run 'gem install GD2' I get some strange errors along with
when I try to require GD2.

C:\Documents and Settings\Mike>gem install gd2
Attempting local installation of 'gd2'
Local gem file not found: gd2*.gem
Attempting remote installation of 'gd2'
Updating Gem source index for: http://gems.rubyforge.org
Successfully installed gd2-1.1
Installing RDoc documentation for gd2-1.1...

lib/gd2/image.rb:681:25: ':' not followed by identified or operator
lib/gd2/palette.rb:55:40: ':' not followed by identified or operator
lib/gd2/palette.rb:93:28: ':' not followed by identified or operator
lib/gd2/palette.rb:94:30: ':' not followed by identified or operator
lib/gd2/palette.rb:95:29: ':' not followed by identified or operator
lib/gd2/palette.rb:96:30: ':' not followed by identified or operator
lib/gd2/palette.rb:97:29: ':' not followed by identified or operator
lib/gd2/palette.rb:189:28: ':' not followed by identified or operator
lib/gd2/palette.rb:190:30: ':' not followed by identified or operator
lib/gd2/palette.rb:191:29: ':' not followed by identified or operator
lib/gd2/palette.rb:192:30: ':' not followed by identified or operator

C:\Documents and Settings\Mike>irb
irb(main):001:0> require 'GD2'
RuntimeError: unknown error
        from C:/Program
Files/ruby/lib/ruby/gems/1.8/gems/gd2-1.1/lib/gd2.rb:29:in `initialize'
        from C:/Program
Files/ruby/lib/ruby/gems/1.8/gems/gd2-1.1/lib/gd2.rb:29
        from C:/Program
Files/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'

        from C:/Program Files/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:182:in
`activate'
        from C:/Program Files/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:181:in
`activate'
        from C:/Program
Files/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:26:in `require'

        from (irb):1
irb(main):002:0>

(condensed some whitespace)

What I'm wondering is

1) What do people use for image processing? I've always used GD when I was
using PHP and it's just "what I'm used to". I'm not really married to any
particular library as long as it has all of the functionality that GD has.

2) Does anyone have any idea what went wrong with my GD gem install? I tried
this on two XP sp2 systems and it yielded the same exact result (wanted to
be sure it wasn't a localized problem). I also get the same results when I
require GD2 on both machines (the other machine has Ruby installed to
C:\ruby - so I know the path in the example above isn't an issue).

Any insight is greatly appreciated!

Thanks

-M

Mike Brum wrote:

1) What do people use for image processing? I've always used GD when I was
using PHP and it's just "what I'm used to". I'm not really married to any
particular library as long as it has all of the functionality that GD has.

RMagick. I haven't really used GD, but I'm sure RMagick is cooler.

http://rmagick.rubyforge.org/

Cheers,
Dave

GD2 seems to be the most-current with the file date of March 4, 2006.
However, when I run 'gem install GD2' I get some strange errors along with when I try to require GD2.

C:\Documents and Settings\Mike>gem install gd2
Attempting local installation of 'gd2'
Local gem file not found: gd2*.gem
Attempting remote installation of 'gd2'
Updating Gem source index for: http://gems.rubyforge.org
Successfully installed gd2-1.1
Installing RDoc documentation for gd2-1.1...

lib/gd2/image.rb:681:25: ':' not followed by identified or operator
lib/gd2/palette.rb:55:40: ':' not followed by identified or operator
lib/gd2/palette.rb:93:28: ':' not followed by identified or operator
lib/gd2/palette.rb:94:30: ':' not followed by identified or operator
lib/gd2/palette.rb:95:29: ':' not followed by identified or operator
lib/gd2/palette.rb:96:30: ':' not followed by identified or operator
lib/gd2/palette.rb:97:29: ':' not followed by identified or operator
lib/gd2/palette.rb:189:28: ':' not followed by identified or operator
lib/gd2/palette.rb:190:30: ':' not followed by identified or operator
lib/gd2/palette.rb:191:29: ':' not followed by identified or operator
lib/gd2/palette.rb:192:30: ':' not followed by identified or operator

These warnings are harmless. RDoc doesn't seem to like symbols constructed from string literals.

C:\Documents and Settings\Mike>irb
irb(main):001:0> require 'GD2'
RuntimeError: unknown error
        from C:/Program
Files/ruby/lib/ruby/gems/1.8/gems/gd2-1.1/lib/gd2.rb:29:in `initialize'
        from C:/Program
Files/ruby/lib/ruby/gems/1.8/gems/gd2-1.1/lib/gd2.rb:29
        from C:/Program
Files/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'

        from C:/Program Files/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:182:in
`activate'
        from C:/Program Files/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:181:in
`activate'
        from C:/Program
Files/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:26:in `require'

        from (irb):1

This error is more significant; Ruby/GD2 depends on the availability of a GD dynamic library, and until version 1.1.1 released today, had no direct support for the Win32 DLL peculiarities.

You might try installing the latest gd2 gem (1.1.1). I had some success in brief testing, but there may still be issues. In particular, there may be problems using bgd.dll with versions of Ruby built under Cygwin. Versions built under mingw32 seem to work better.

···

On May 10, 2006, at 6:37 AM, Mike Brum wrote:

--
Rob Leslie
rob@mars.org

RMagick. I haven't really used GD, but I'm sure RMagick is cooler.

http://rmagick.rubyforge.org/

I checked that out, but they unfortunately only have bindings for up to
1.8.2 on Windows and I'm running 1.8.4.

At least it looks like RMagick is being actively developed. Hopefully it's
not too long until there's something I can use.

Thanks for the link though!

-M

if you simply take the time to compile ruby yourself using msys then not only
will you be able to run 1.8.4 but you'll be able to install rmagic, narray,
gsl, etc. using the standard

   ruby extconf.rb && make && make install

if you use the one click you'll always need to wait for extension writers to
compile for you.

fyi.

-a

···

On Thu, 11 May 2006, Mike Brum wrote:

RMagick. I haven't really used GD, but I'm sure RMagick is cooler.

http://rmagick.rubyforge.org/

I checked that out, but they unfortunately only have bindings for up to
1.8.2 on Windows and I'm running 1.8.4.

At least it looks like RMagick is being actively developed. Hopefully it's
not too long until there's something I can use.

Thanks for the link though!

-M

--
be kind whenever possible... it is always possible.
- h.h. the 14th dali lama

Mike Brum wrote:

http://rmagick.rubyforge.org/

I checked that out, but they unfortunately only have bindings for up to
1.8.2 on Windows and I'm running 1.8.4.

What makes you say that? My setup works fine:

irb(main):009:0> Magick::Version
=> "RMagick 1.10.1"
irb(main):010:0> RUBY_VERSION
=> "1.8.4"

Cheers,
Dave

From the news section of the RMagick page:

http://rubyforge.org/forum/forum.php?forum_id=6439

It's certainly possible that I'm misinterperating what's being said here.
Until Ruby, I haven't really had to deal with libraries and such, so this is
a bit of a learning curve to me.

Thanks for the info though - I may just give it a shot.

-M

···

-----Original Message-----
From: Dave Burt [mailto:dave@burt.id.au]
What makes you say that? My setup works fine:

irb(main):009:0> Magick::Version
=> "RMagick 1.10.1"
irb(main):010:0> RUBY_VERSION
=> "1.8.4"

Cheers,
Dave

Mike Brum wrote:

From: Dave Burt [mailto:dave@burt.id.au]
What makes you say that? My setup works fine:

irb(main):009:0> Magick::Version
=> "RMagick 1.10.1"
irb(main):010:0> RUBY_VERSION
=> "1.8.4"

Cheers,
Dave

From the news section of the RMagick page:

http://rubyforge.org/forum/forum.php?forum_id=6439

It's certainly possible that I'm misinterperating what's being said here.
Until Ruby, I haven't really had to deal with libraries and such, so this is
a bit of a learning curve to me.

Thanks for the info though - I may just give it a shot.

Well read. Don't use it in production, but I believe it generally works.
(I haven't used it in an application as such, just scripts.)

Many people are using versions of Iconv and Ruby 1.8.2 that were
compiled with different compilers (the opposite two to this case)
without major issues that I've heard of.

Cheers,
Dave

···

-----Original Message-----

A number of people reported that the RMagick 1.10.0 Win32 beta gem caused problems in RoR applications that were using the 1.8.4 One Click Installer version of Ruby, so I withdrew it until Kaspar could acquire and install a different compiler and build a new gem. I don't know if the beta gem causes problems with non-RoR applications.

See http://rubyforge.org/tracker/index.php?func=detail&aid=4036&group_id=12&atid=133

···

On May 11, 2006, at 11:07 AM, Dave Burt wrote:

Mike Brum wrote:

-----Original Message-----
From: Dave Burt [mailto:dave@burt.id.au]
What makes you say that? My setup works fine:

irb(main):009:0> Magick::Version
=> "RMagick 1.10.1"
irb(main):010:0> RUBY_VERSION
=> "1.8.4"

Cheers,
Dave

From the news section of the RMagick page:

http://rubyforge.org/forum/forum.php?forum_id=6439

It's certainly possible that I'm misinterperating what's being said here.
Until Ruby, I haven't really had to deal with libraries and such, so this is
a bit of a learning curve to me.

Thanks for the info though - I may just give it a shot.

Well read. Don't use it in production, but I believe it generally works.
(I haven't used it in an application as such, just scripts.)

Many people are using versions of Iconv and Ruby 1.8.2 that were
compiled with different compilers (the opposite two to this case)
without major issues that I've heard of.

Cheers,
Dave