def pixel_intensity(pixel)
      (306 * (pixel.red & MAX_QUANTUM) + 601 * (pixel.green & MAX_QUANTUM) + 117 * (pixel.blue & MAX_QUANTUM)) / 1024
    end
def pixel_intensity(pixel)
      (306 * (pixel.red & MAX_QUANTUM) + 601 * (pixel.green & MAX_QUANTUM) + 117 * (pixel.blue & MAX_QUANTUM)) / 1024
    end
Returns a value between 0 and MAX_QUANTUM. Same as the PixelIntensity macro.