- Ruby 初心者スレッド Part 57©2ch.net [転載禁止]©2ch.net
635 :uy ◆Qawu9.2l1E [sage]:2015/11/06(金) 18:59:35.72 ID:AWzYOs1s - >>634
^^; >>630 更新 atmp = "\xFF".force_encoding("ASCII-8BIT") for line in bmpi do pos = 0 pngl = "" while pos < line.size # BGR => RGBA pngl << line[pos+2] + line[pos+1] + line[pos] + atmp pos+=3 end pngi << [ 0 , pngl] end
|
|