objektify2 / load.py
tripleS-Dev
update V1.3.8
3e8ff37
raw
history blame
No virus
1 kB
import PIL.Image
import gradio as gr
def front(image_path, obj_color, obj_color_picker, ai_num, txt_color,
txt_color_picker, member_name_dropdown, group_name_radio, group_name_txt,
obj_num,
obj_alphabet, obj_alphabet_txt, obj_serial):
image = PIL.Image.open(image_path)
info = image.info
if not 'objektify' in info:
#gr.Warning('The image was either created before version 1.4 or it was not created using Objektify.')
return obj_color, obj_color_picker, ai_num, txt_color, txt_color_picker, member_name_dropdown, group_name_radio, group_name_txt, obj_num, obj_alphabet, obj_alphabet_txt, obj_serial
return info["obj_color"], info["obj_color_picker"], info['ai_num'], info['txt_color'], info['txt_color_picker'], info['member_name_dropdown'], info['group_name_radio'], info['group_name_txt'], info['obj_num'], info['obj_alphabet'], info['obj_alphabet_txt'], info['obj_serial']