def image_data(image):
<EOL>data = image.tobytes()<EOL>components = len(data) // (image.size[<NUM_LIT:0>] * image.size[<NUM_LIT:1>])<EOL>return components, data<EOL>
Get components and bytes for an image