[Python] How to convert a PIL ImageDraw to Image

Discussão em 'Python' iniciado por Stack, Novembro 30, 2025.

  1. Stack

    Stack Membro Participativo

    I have a PIL image:

    img=Image.open(...)


    that I convert to an ImageDraw to write in it.

    img=ImageDraw.Draw(img)


    Now I put the text in:

    img.text((0,0), 'text', (0,0,0))


    and now I want it BACK AS AN IMAGE

    I was hoping for something like this:

    img = Image.fromdraw(img)


    I need my image in this format, for further processing.

    How do I do that?

    Continue reading...

Compartilhe esta Página