mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-18 00:32:11 +01:00
Report image metadata such as ICCP and XMP
This commit is contained in:
1 parent
abaaee3cac
commit
21f2890217
7 files changed
+857
-200
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user