module ChunkyPNG::Canvas::Operations

def grayscale!

Other tags:
    See: {ChunkyPNG::Color#to_grayscale} -
    See: {#grayscale} -

Returns:
  • (ChunkyPNG::Canvas) - Returns itself, converted to grayscale.
def grayscale!
  pixels.map! { |pixel| ChunkyPNG::Color.to_grayscale(pixel) }
  self
end