Jump to content

Grayscale image: Difference between revisions

m
→‎{{header|Ruby}}: add grayscale-in-place method
(add Ruby)
m (→‎{{header|Ruby}}: add grayscale-in-place method)
Line 545:
end
gray
end
 
def to_grayscale!
@width.times do |x|
@height.times do |y|
self[x,y] = self[x,y].to_grayscale
end
end
end
end</lang>
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.