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?
ImageDraw draws on your original image, therefore you should keep both instances (Image and ImageDraw objects) in separate variables.
img = Image.open(...)
draw = ImageDraw.Draw(img)
draw.text((0,0), 'text', (0,0,0))
# img is modified inplace
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With