[Python] Convert PIL Image to byte array?

Discussão em 'Python' iniciado por Stack, Abril 12, 2025.

  1. Stack

    Stack Membro Participativo

    I have an image in PIL Image format. I need to convert it to byte array.

    img = Image.open(fh, mode='r')
    roiImg = img.crop(box)


    Now I need the roiImg as a byte array.

    Continue reading...

Compartilhe esta Página