Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
ComfyUI
Commits
bece24d2
Commit
bece24d2
authored
Apr 08, 2023
by
comfyanonymous
Browse files
Merge branch 'fix/pnginfo-import' of
https://github.com/filipemeneses/ComfyUI
parents
c982c937
e76890dc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
web/scripts/pnginfo.js
web/scripts/pnginfo.js
+3
-2
No files found.
web/scripts/pnginfo.js
View file @
bece24d2
...
@@ -32,8 +32,9 @@ export function getPngMetadata(file) {
...
@@ -32,8 +32,9 @@ export function getPngMetadata(file) {
}
}
const
keyword
=
String
.
fromCharCode
(...
pngData
.
slice
(
offset
+
8
,
keyword_end
));
const
keyword
=
String
.
fromCharCode
(...
pngData
.
slice
(
offset
+
8
,
keyword_end
));
// Get the text
// Get the text
const
text
=
String
.
fromCharCode
(...
pngData
.
slice
(
keyword_end
+
1
,
offset
+
8
+
length
));
const
contentArraySegment
=
pngData
.
slice
(
keyword_end
+
1
,
offset
+
8
+
length
);
txt_chunks
[
keyword
]
=
text
;
const
contentJson
=
Array
.
from
(
contentArraySegment
).
map
(
s
=>
String
.
fromCharCode
(
s
)).
join
(
''
)
txt_chunks
[
keyword
]
=
contentJson
;
}
}
offset
+=
12
+
length
;
offset
+=
12
+
length
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment