What do you want to save?
Add Code snippet
New code examples
-
Python 2022-03-02 20:00:07
discord.File(fp=image_binary,filename=name) discord py
image = Image.open("test.png") with BytesIO() as image_binary: image.save(image_binary, "PNG") image_binary.seek(0) await ctx.send(file=discord.File(fp=image_binary,filename="image.png")) Add solution -
Python 2022-02-06 21:50:20
im save to a bytes io python
from io import BytesIO from PIL import Image, ImageDraw image = Image.new("RGB", (300, 50)) draw = ImageDraw.Draw(image) draw.text((0, 0), "This text is drawn on image") byte_io = BytesIO() image.save(byte_io, 'PNG') Add solution -
Python 2022-02-02 01:35:57
can i save additional information with png file
from PIL.PngImagePlugin import PngImageFile, PngInfo targetImage = PngImageFile("pathToImage.png") metadata = PngInfo() metadata.add_text("MyNewString", "A string") metadata.add_text("MyNewInt", str(1234)) target... Add solution -
Python 2021-10-23 10:57:13
put text on image python
from PIL import Image, ImageFont, ImageDraw my_image = Image.open("image.jpg") title_font = ImageFont.truetype('font.ttf', 200) image_editable = ImageDraw.Draw(my_image) image_editable.text((15,15), "Text goes here", (237, 230, 211)... Add solution
Best helpers
Ranking is empty