(data []byte, mimeOverride string)
| 875 | putUint24LE(chunk[vp8xHeightOffset:], height-1) |
| 876 | return chunk |
| 877 | } |
| 878 | |
| 879 | func putUint24LE(b []byte, v int) { |
| 880 | b[0] = uint8(v) |
| 881 | b[1] = uint8(v >> 8) |
| 882 | b[2] = uint8(v >> 16) |
| 883 | } |
| 884 | |
| 885 | func writeChunk(buf *bytes.Buffer, tag string, data []byte) { |
| 886 | buf.WriteString(tag) |
| 887 | sz := make([]byte, 4) |
| 888 | binary.LittleEndian.PutUint32(sz, uint32(len(data))) |
| 889 | buf.Write(sz) |
| 890 | buf.Write(data) |
| 891 | if len(data)%2 == 1 { |
| 892 | buf.WriteByte(0) |
| 893 | } |
| 894 | } |
no test coverage detected