ちなみにボトルネックを調べようと -rprofile 付きで実行したところ % cumulative self self total time seconds seconds calls ms/call ms/call name 0.00 1.24 0.00 1 0.00 1240.00 #toplevel という悲しい結果になりました。プロファイラはまだ未対応のようですね。 追記 1.9.0 では IO.getc や String#[] が Integer ではなく一文字の String を返します。とりあえずの回避策として String#ord を追加するパッチをあげておきます。 --- pureimage.rb 2007-01-06 02:58:26.000000000 +0900 +++ pureimage.rb 2007-01-06 03:02:59.000000000 +090