I'm trying to create some Images for characters and name them with that character. this is my char list:
letters=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z",":",",",
".","1","2","3","4","5","6","7","8","9","0","-","_","=","+","`","~","[","]","{","}","<",">","&","*","^",",","|",
"/","@","#","$","%","(",")",";",":","'","."]
It's ok till it arrives to "." and it throw this error:
IsADirectoryError: [Errno 21] Is a directory: '.'
this is my code for create this pngs:
for x in letters:
print("create " + x)
txtImg = Image.new('RGB', (200, 100), (255,255,255))
d = ImageDraw.Draw(txtImg)
d.text((20, 20), x, fill=(0, 0, 0))
s = io.BytesIO()
txtImg.save(str(x),"png")
how can I solve that?