pyufunc.img_PIL_to_bytes#
- pyufunc.img_PIL_to_bytes(img)#
Convert PIL image to bytes.
- Parameters:
img (Image) – PIL image object
- Returns:
the image bytes
- Return type:
Example
>>> from PIL import Image >>> from pyufunc import img_PIL_to_bytes >>> img = Image.open('test.jpg') >>> img_b = img_PIL_to_bytes(img) >>> print(img_b)