import cv2 import numpy as np img_size = (400, 400) img = np...


import cv2
import numpy as np


img_size = (400, 400)


img = np.zeros(img_size, dtype=np.uint8)

words = ["love", "cosmos"]
font_scale = 2


font = cv2.FONT_HERSHEY_SIMPLEX

for word in words:
    text_size, baseline = cv2.getTextSize(word, font, font_scale, 2)
    x = (img_size[0] - text_size[0]) // 2
    y = (img_size[1] + text_size[1]) // 2
    cv2.putText(img, word, (x, y), font, font_scale, (255, 255, 255),

import cv2 import numpy as np img_size = (400, 400) img = np.zeros(img_size, dtype=np.uint8) words = ["love", "cosmos"] font_scale = 2 font = cv2.FONT_HERSHEY_SIMPLEX for word in words: text_size, baseline = cv2.getTextSize(word, font, font_scale, 2) x = (img_size[0] - text_size[0]) // 2 y = (img_size[1] + text_size[1]) // 2 cv2.putText(img, word, (x, y), font, font_scale, (255, 255, 255),




{ "seed": "1979978402", "steps": 30, "width": 512, "height": 512, "version": "SD1.4_SH", "sampler_name": "k_dpm_2", "guidance_scale": 7.5 }



Comments