Report image metadata such as ICCP and XMP

This commit is contained in:
Nigel Tao committed 2019-04-20 16:33:11 +10:00
1 parent abaaee3cac
commit 21f2890217
7 files changed
+857 -200

No files matched your search

+13
View File
@@ -512,6 +512,7 @@ var gifGlobals struct {
func stateGif(line string) (stateFunc, error) {
const (
cmdB = "bytes "
cmdL = "lzw "
cmdLC = "loopCount "
)
@@ -532,6 +533,18 @@ outer:
out = append(out, 0x3B)
return stateGif, nil
case strings.HasPrefix(line, cmdB):
s := line[len(cmdB):]
for s != "" {
x, ok := uint32(0), false
x, s, ok = parseHex(s)
if !ok {
break outer
}
out = append(out, uint8(x))
}
return stateGif, nil
case strings.HasPrefix(line, cmdL):
s := line[len(cmdL):]
litWidth, s, ok := parseNum(s)