0
我想要逐個像素地處理圖像,並且需要查找每個像素的RGB值。這是我確切的要求。ruby中的圖像處理
這是使用rmagick寶石。但處理整個圖像的速度非常慢。
這是我的代碼,
source = Magick::Image.read("http://sphotos-e.ak.fbcdn.net/hphotos-ak-ash3/s720x720/1000741_634750993209985_702651963_n.jpg")
source.rows.times do |row|
source.columns.times do |col|
end
end
任何一個可以給我解決這個?
。我的意思是我需要生成[馬賽克圖像] http://en.wikipedia.org/wiki/Photographic_mosaic – SaravanaKumAr