Change params for more text

This commit is contained in:
Emilio Martínez 2023-12-26 23:15:42 -03:00
parent d614022b59
commit b1d45543dc
2 changed files with 3 additions and 3 deletions

View File

@ -5,7 +5,7 @@ import string
from text_utils import generate_random_txt_img
NUM_IMAGES = 10
NUM_CHARACTERS = 25000
NUM_CHARACTERS = 29000
IMG_SHAPE = (1600,900)
TEXT_SIZE = 22

View File

@ -11,7 +11,7 @@ def generate_random_txt_img(text, img_shape, text_size, text_color, background_c
# Compute amount of lines depending on image shape and number of characters
N_total = len(text)
N_lines = N_total//img_shape[1]
N_horizontal = img_shape[0]//(text_size)
N_horizontal = int(1.6 * img_shape[0] // (text_size))
# Get system font types
system_fonts = font_manager.findSystemFonts()
@ -36,7 +36,7 @@ def generate_random_txt_img(text, img_shape, text_size, text_color, background_c
# Adjust text position
posicion_texto = ((imagen.width - fuente.getsize(texto_linea)[0]) // 2,
int(1.5* iter * text_size)
int(1.25* iter * text_size)
)
# Write text