Grayscale image: Difference between revisions

Content deleted Content added
Line 538: Line 538:
class Bitmap
class Bitmap
def to_grayscale
def to_grayscale
gray = Bitmap.new(@width, @height)
gray = self.class.new(@width, @height)
@width.times do |x|
@width.times do |x|
@height.times do |y|
@height.times do |y|