From: Charles Comstock Date: 2004-02-11T17:39:57+09:00 Subject: Re: What Ruby versions are still active? Tim Hunter wrote: > I'm preparing the next release of RMagick. Are enough people still > using 1.6.7 and 1.6.8 that I need to test with those version. I don't know if it's possible, but a really useful function which would be similar to convolve but add some extra functionality, is if a function was written yields the area you would otherwise convolve over, and whatever your function returns it takes as the central value. So if you had a 100x100 pixel image, and you called say imagemap(5,5) do |area| max = 0 min = 255 5.times do |i| 5.times do |j| max = max(area[i,j],max) min = min(area[i,j],min) end end max - area[i,j] > area[i,j] - min ? min : max end where area would be a Matrix I guess or nested arrays, though the Matrix would probably be nicer. That or just a function that directly returns a Matrix like accessor to the raw image data, but saves to it still change the original data. Something like that would be nice anyway, RMagick is nice cause it understands all the image formats, but it seems like it would be nice to have some direct image pixel manipulation, not just the line drawing system. Matrix style accessors instead of the flat arrays would be nice overall though. Charlie