# Ruby/GD2 1.0

**URL:** <https://www.ruby-forum.com/t/ruby-gd2-1-0/95965>\
**Category:** Ruby\
**Created:** [November 15, 2005, 2:02am UTC](https://www.ruby-forum.com/t/ruby-gd2-1-0/95965 "2005-11-15T02:02:57Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![rob](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/838e76/32.png) [@rob](https://www.ruby-forum.com/u/rob)\
**Post date:** [November 15, 2005, 2:02am UTC](https://www.ruby-forum.com/t/ruby-gd2-1-0/95965/1 "2005-11-15T02:02:57Z")

</div>

Greetings,

I’ve taken some of the suggestions here and made improvements to my  
Ruby/GD2 library.

First, the gem:

```
 ftp://ftp.mars.org/pub/ruby/gd2-1.0.gem

```

Some of the changes:

- I took Matz’s feelings to heart and realized the weirdness with  
Palette#find! is probably because Palette#find clashed with  
Enumerable#find. So, I removed both methods and added Palette#resolve  
instead. (Palette#find used to be just an alias for Palette#exact.)

- I’ve gone through and documented most of the library with RDoc,  
except for the Canvas class. I’m still working on this and may make  
some further improvements before finalizing the API.

- I added Image.import and Image#export methods. These accept a  
filename and use the filename extension to determine the image format.

- The Image#jpeg\_data, Image#png\_data, et al. methods are now just  
Image#jpeg, Image#png, etc.

I left the non-destructive image operations alone, because they  
aren’t significantly more expensive than the destructive versions.  
(Either version must create a new gd image internally.)

Thanks for everyone’s feedback, which I continue to welcome.

I have one question: what is the process for including gems in the  
remote repository?

Cheers,

---

<div class="post-metadata">

**Author:** ![rob](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/838e76/32.png) [@rob](https://www.ruby-forum.com/u/rob)\
**Post date:** [November 15, 2005, 3:47pm UTC](https://www.ruby-forum.com/t/ruby-gd2-1-0/95965/2 "2005-11-15T15:47:49Z")

</div>

On Tue, 2005-11-15 at 10:00 +0900, Rob L. wrote:

> I have one question: what is the process for including gems in the  
> remote repository?

I think you’re hitting this:

[http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/161508](http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/161508)

You may want to rebuild the Gem with Ruby 1.8.2…

Yours,

Tom

---

<div class="post-metadata">

**Author:** ![rob](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/838e76/32.png) [@rob](https://www.ruby-forum.com/u/rob)\
**Post date:** [November 15, 2005, 4:27pm UTC](https://www.ruby-forum.com/t/ruby-gd2-1-0/95965/3 "2005-11-15T16:27:01Z")

</div>

On Nov 15, 2005, at 7:47 AM, Tom C. wrote:

> On Tue, 2005-11-15 at 10:00 +0900, Rob L. wrote:
> 
> > I have one question: what is the process for including gems in the  
> > remote repository?

> I think you’re hitting this:
> 
> [http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/161508](http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/161508)
> 
> You may want to rebuild the Gem with Ruby 1.8.2…

Perhaps your question is more basic in nature? If you’re wondering  
how to host your gem so that anyone can do a magical “gem install  
” command, you need to create a RubyForge project by  
going to [rubyforge.org](http://rubyforge.org). Then when you upload your .gem file, mark it  
explicitly as a “gem” and RubyForge will do the rest for you (there’s  
a drop-down box for file types).

Duane J.  
(canadaduane)

---

<div class="post-metadata">

**Author:** ![rob](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/838e76/32.png) [@rob](https://www.ruby-forum.com/u/rob)\
**Post date:** [November 15, 2005, 5:12pm UTC](https://www.ruby-forum.com/t/ruby-gd2-1-0/95965/4 "2005-11-15T17:12:15Z")

</div>

On Nov 15, 2005, at 7:26 AM, Duane J. wrote:

> Perhaps your question is more basic in nature? If you’re wondering  
> how to host your gem so that anyone can do a magical “gem install  
> ” command, you need to create a RubyForge project by  
> going to [rubyforge.org](http://rubyforge.org). Then when you upload your .gem file, mark  
> it explicitly as a “gem” and RubyForge will do the rest for you  
> (there’s a drop-down box for file types).

Thanks!

If all went well, there should now be a gd2 gem available to all.

---

<div class="post-metadata">

**Author:** ![rob](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/838e76/32.png) [@rob](https://www.ruby-forum.com/u/rob)\
**Post date:** [November 15, 2005, 8:00pm UTC](https://www.ruby-forum.com/t/ruby-gd2-1-0/95965/5 "2005-11-15T20:00:57Z")

</div>

On Wed, 2005-11-16 at 01:09 +0900, Rob L. wrote:

> > Perhaps your question is more basic in nature? If you’re wondering  
> > how to host your gem so that anyone can do a magical “gem install  
> > ” command, you need to create a RubyForge project by  
> > going to [rubyforge.org](http://rubyforge.org). Then when you upload your .gem file, mark  
> > it explicitly as a “gem” and RubyForge will do the rest for you  
> > (there’s a drop-down box for file types).
> 
> Thanks!
> 
> If all went well, there should now be a gd2 gem available to all.

Yup!

================  
$ gem list --remote gd2

\*\*\* REMOTE GEMS \*\*\*  
Updating Gem source index for: [http://gems.rubyforge.org](http://gems.rubyforge.org)

# gd2 (1.0) Ruby interface to gd 2 library.

Yours,

Tom

---

<div class="post-metadata">

**Author:** ![rob](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/838e76/32.png) [@rob](https://www.ruby-forum.com/u/rob)\
**Post date:** [November 15, 2005, 4:33pm UTC](https://www.ruby-forum.com/t/ruby-gd2-1-0/95965/6 "2005-11-15T16:33:05Z")

</div>

On Wed, 2005-11-16 at 00:26 +0900, Duane J. wrote:

> > You may want to rebuild the Gem with Ruby 1.8.2…
> 
> Perhaps your question is more basic in nature? If you’re wondering  
> how to host your gem so that anyone can do a magical “gem install  
> ” command, you need to create a RubyForge project by  
> going to [rubyforge.org](http://rubyforge.org). Then when you upload your .gem file, mark it  
> explicitly as a “gem” and RubyForge will do the rest for you (there’s  
> a drop-down box for file types).

Ah, quite right, thanks Duane! I skipped right over the obvious that  
time…

Thanks,

tom
