def each_pixel
      get_pixels(0, 0, columns, rows).each_with_index do |p, n|
        yield(p, n % columns, n / columns)
      end
      self
    end
def each_pixel
      get_pixels(0, 0, columns, rows).each_with_index do |p, n|
        yield(p, n % columns, n / columns)
      end
      self
    end
Thanks to Russell Norris!