importosfromPILimportImage,ImageFont,ImageDraw# Supports `WIDTH` > `HEIGHT` and conversely.WIDTH=1_000HEIGHT=1_000TEXT='PRNU'img=Image.new('L',(WIDTH,HEIGHT))draw=ImageDraw.Draw(img)# I guess that the maximal character height is higher than the maximal character width. Hence, the `TEXT` may not be spanned on the full width.fontSize=min(HEIGHT,WIDTH//len(TEXT))font=ImageFont.truetype(os.path.expanduser('~/.local/share/fonts/impact.ttf'),fontSize)# Center vertically, especially in the case `HEIGHT` > `WIDTH`.draw.text((0,HEIGHT//2-fontSize//2),TEXT,255,font=font)img.show()
I do not know if I have done anything on Linux Mint to have this font at this location.
find /usr/share/fonts/ -iname '*impact*'
does not return any result on my Linux Mint.
```py
import os
from PIL import Image, ImageFont, ImageDraw
# Supports `WIDTH` > `HEIGHT` and conversely.
WIDTH = 1_000
HEIGHT = 1_000
TEXT = 'PRNU'
img = Image.new('L', (WIDTH, HEIGHT))
draw = ImageDraw.Draw(img)
# I guess that the maximal character height is higher than the maximal character width. Hence, the `TEXT` may not be spanned on the full width.
fontSize = min(HEIGHT, WIDTH // len(TEXT))
font = ImageFont.truetype(os.path.expanduser('~/.local/share/fonts/impact.ttf'), fontSize)
# Center vertically, especially in the case `HEIGHT` > `WIDTH`.
draw.text((0, HEIGHT // 2 - fontSize // 2), TEXT, 255, font = font)
img.show()
```
I do not know if I have done anything on Linux Mint to have this font at this location.
```bash
find /usr/share/fonts/ -iname '*impact*'
```
does not return any result on my Linux Mint.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Would enable easy comprehension if adding images thanks to splitting helps.
See #21 and #24.
I do not know if I have done anything on Linux Mint to have this font at this location.
does not return any result on my Linux Mint.
Should also be able to Gaussian noise the generated text.
https://stackoverflow.com/a/16377244
https://stackoverflow.com/a/4902713
2d96bdc225