Add native "Stealth" infotext support (#2684)

This commit is contained in:
catboxanon
2025-02-23 15:03:50 -05:00
committed by GitHub
parent 184bb04f8d
commit c4b6fccefc
5 changed files with 216 additions and 34 deletions
+4
View File
@@ -197,10 +197,14 @@ def connect_paste_params_buttons():
def send_image_and_dimensions(x):
if isinstance(x, Image.Image):
img = x
if img.mode == 'RGBA':
img = img.convert('RGB')
elif isinstance(x, list) and isinstance(x[0], tuple):
img = x[0][0]
else:
img = image_from_url_text(x)
if img is not None and img.mode == 'RGBA':
img = img.convert('RGB')
if shared.opts.send_size and isinstance(img, Image.Image):
w = img.width