GD::Image

Hello, I’m trying to use a roles based login management tool that
requires the GD Library. I’m on windows xp, so the ports (from php I
believe) that they provide for os x and linux won’t work. Any ideas as
to how to get up and running with GD Library on Ruby for image
manipulation?

The site is here:
http://penso.info/auth_generator/install

As you can see in that install guide they specify “First, you should
have the GD library for ruby installed. The port for MacOsX is called
rb-gd, the Debian package should be called libgd-ruby1.8.”

This is an example of how it’s used in the code

File::open(tempfile.path, mode=“r”) { |f|
img = nil
case @params[:post][:picture].content_type.chomp
when “image/jpeg” then
img = GD::Image.newFromJpeg(f)
when “image/png” then
img = GD::Image.newFromPng(f)
when “image/pjpeg” then
img = GD::Image.newFromJpeg(f)
when “image/x-png” then
img = GD::Image.newFromPng(f)
end