2
我需要操縱rmagick中的圖像的每個像素。我在IRB(交互式紅寶石)這樣做這是我有:Rmagick each_pixel,它是如何工作的?
require 'Rmagick'
include Magick
f = Image.new(100,100)
f.display #so far so good. A 100x100 white image is displayed
f.each_pixel {|pixel, c, r| pixel.red = 0}
f.display #the image is still white. It should really be a shade of blue.
我在做什麼錯?
哈!忘了這一點,谷歌搜索同樣的問題,並發現這一點:)再次感謝布賴斯:) – Automatico 2014-04-06 11:26:19