From: pclc_perl@... Date: 2011-08-08T13:55:50+09:00 Subject: [ruby-list:48279] tkライブラリのppm画像表示について --0-1130161555-1312779349=:47925 Content-Type: text/plain; charset=iso-2022-jp px = 240 py = 180 colmax = 0xff printf("P6\n%d %d\n%d\n",px,py,colmax) cb = 0 cg = 0 cr = 255 for i in 0 ... py for j in 0 ... px printf("%c%c%c",cr,cg,cb) end end というソースでppmのp6形式の画像を作成し、 require "tk" TkButton.new { image TkPhotoImage.new("file" => "a.ppm") pack } Tk.mainloop というソースで画像を表示したんですが赤色になると思うんですが緑色になってしまいます。TkPhotoImageの仕様でしょうか?それとも、画像生成の時点で何か間違っているのでしょうか?よろしくお願いします。 OS windows vista ruby 1.9.2p290 (2011-07-09) [i386-mingw32] --0-1130161555-1312779349=:47925--