mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-18 00:32:11 +01:00
Tweak test/data/artif*/gif-transparent-index.gif
This commit is contained in:
1 parent
344123b179
commit
6c2fb9a2fd
3 files changed
+47
-16
No files matched your search
@@ -959,7 +959,7 @@ outer:
|
||||
|
||||
flags := uint8(0)
|
||||
duration := uint32(0)
|
||||
transparentIndex := uint32(0)
|
||||
transparentIndex := uint8(0)
|
||||
for s != "" {
|
||||
term := ""
|
||||
if i := strings.IndexByte(s, ' '); i >= 0 {
|
||||
@@ -980,12 +980,12 @@ outer:
|
||||
case term == "animationDisposalRestorePrevious":
|
||||
flags |= 0x0C
|
||||
case strings.HasPrefix(term, trans):
|
||||
num, remaining, ok := parseNum(term[len(trans):])
|
||||
if !ok || remaining != "" {
|
||||
num, err := strconv.ParseUint(term[len(trans):], 0, 8)
|
||||
if err != nil {
|
||||
break outer
|
||||
}
|
||||
flags |= 0x01
|
||||
transparentIndex = num
|
||||
transparentIndex = uint8(num)
|
||||
case strings.HasSuffix(term, ms):
|
||||
num, remaining, ok := parseNum(term[:len(term)-len(ms)])
|
||||
if !ok || remaining != "" {
|
||||
@@ -1002,7 +1002,7 @@ outer:
|
||||
flags,
|
||||
uint8(duration>>0),
|
||||
uint8(duration>>8),
|
||||
uint8(transparentIndex),
|
||||
transparentIndex,
|
||||
0x00,
|
||||
)
|
||||
return stateGif, nil
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 89 B After Width: | Height: | Size: 165 B |
@@ -1,36 +1,67 @@
|
||||
# Feed this file to script/make-artificial.go
|
||||
|
||||
# This GIF image has two frames. The first is 4x2 and contains 8 shades of red.
|
||||
# The second is 3x1, positioned at (1, 1), and nominally contains 3 shades of
|
||||
# blue but the middle pixel is transparent.
|
||||
|
||||
make gif
|
||||
|
||||
header
|
||||
|
||||
image {
|
||||
imageWidthHeight 4 1
|
||||
# Four shades of red and then green, cyan, blue, white.
|
||||
imageWidthHeight 4 2
|
||||
# 16 shades of red and then 16 shades of blue.
|
||||
palette {
|
||||
0x00 0x00 0x00
|
||||
0x10 0x00 0x00
|
||||
0x20 0x00 0x00
|
||||
0x30 0x00 0x00
|
||||
0x40 0x00 0x00
|
||||
0x50 0x00 0x00
|
||||
0x60 0x00 0x00
|
||||
0x70 0x00 0x00
|
||||
|
||||
0x80 0x00 0x00
|
||||
0x90 0x00 0x00
|
||||
0xA0 0x00 0x00
|
||||
0xB0 0x00 0x00
|
||||
0x00 0xC0 0x00
|
||||
0x00 0xD0 0xD0
|
||||
0x00 0x00 0xE0
|
||||
0xF0 0xF0 0xF0
|
||||
0xC0 0x00 0x00
|
||||
0xD0 0x00 0x00
|
||||
0xE0 0x00 0x00
|
||||
0xF0 0x00 0x00
|
||||
|
||||
0x00 0x00 0x00
|
||||
0x00 0x00 0x11
|
||||
0x00 0x00 0x22
|
||||
0x00 0x00 0x33
|
||||
0x00 0x00 0x44
|
||||
0x00 0x00 0x55
|
||||
0x00 0x00 0x66
|
||||
0x00 0x00 0x77
|
||||
|
||||
0x00 0x00 0x88
|
||||
0x00 0x00 0x99
|
||||
0x00 0x00 0xAA
|
||||
0x00 0x00 0xBB
|
||||
0x00 0x00 0xCC
|
||||
0x00 0x00 0xDD
|
||||
0x00 0x00 0xEE
|
||||
0x00 0x00 0xFF
|
||||
}
|
||||
}
|
||||
|
||||
graphicControl animationDisposalNone 100ms
|
||||
|
||||
frame {
|
||||
frameLeftTopWidthHeight 0 0 4 1
|
||||
frameLeftTopWidthHeight 0 0 4 2
|
||||
}
|
||||
lzw 7 0x00 0x01 0x02 0x03
|
||||
lzw 7 0x08 0x09 0x0A 0x0B 0x0C 0x0D 0x0E 0x0F
|
||||
|
||||
graphicControl animationDisposalNone 200ms transparentIndex=5
|
||||
graphicControl animationDisposalNone 200ms transparentIndex=0x1A
|
||||
|
||||
frame {
|
||||
frameLeftTopWidthHeight 0 0 3 1
|
||||
frameLeftTopWidthHeight 1 1 3 1
|
||||
}
|
||||
lzw 7 0x04 0x05 0x06
|
||||
lzw 7 0x1F 0x1A 0x15
|
||||
|
||||
trailer
|
||||
Reference in new issue
Block a user