File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -18,9 +18,18 @@ def run_pnginfo(image):
1818 return '' , '' , ''
1919
2020 geninfo , items = images .read_info_from_image (image )
21- items = {** {'parameters' : geninfo }, ** items }
2221
2322 info = ''
23+ # 先显示 parameters
24+ if geninfo :
25+ info += f"""
26+ <div class="infotext-parameters">
27+ <p><b>{ plaintext_to_html ('parameters' )} </b></p>
28+ <p>{ plaintext_to_html (str (geninfo ))} </p>
29+ </div>
30+ """ .strip ()+ "\n "
31+
32+ # 再显示其他 items
2433 for key , text in items .items ():
2534 info += f"""
2635<div class="infotext">
@@ -29,7 +38,7 @@ def run_pnginfo(image):
2938</div>
3039""" .strip ()+ "\n "
3140
32- if len (info ) == 0 :
41+ if len (info ) == 0 and not geninfo :
3342 message = "Nothing found in the image."
3443 info = f"<div><p>{ message } <p></div>"
3544
You can’t perform that action at this time.
0 commit comments