MCPcopy Create free account
hub / github.com/asternic/wuzapi / convertToWebPSticker

Function convertToWebPSticker

helpers.go:877–901  ·  view source on GitHub ↗
(data []byte, mimeOverride string)

Source from the content-addressed store, hash-verified

875 putUint24LE(chunk[vp8xHeightOffset:], height-1)
876 return chunk
877}
878
879func putUint24LE(b []byte, v int) {
880 b[0] = uint8(v)
881 b[1] = uint8(v >> 8)
882 b[2] = uint8(v >> 16)
883}
884
885func 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}

Callers 1

processStickerDataFunction · 0.85

Calls 2

convertImageToWebPFunction · 0.85

Tested by

no test coverage detected