image/vnd.tencent.tap A file format that could represent a static image or multiple static images or an animation. JPEG or H.264 raw video can be used for data compression. File Structure Overview ------------------------ 'T''A''P''0' ------------------------ width ------------------------ height ------------------------ codec ------------------------ nimage ------------------------ delayms[0] delayms[1] : : delayms[nimage-1] ------------------------ nchunk ------------------------ chunkid[0] chunksize[0] chunkid[1] chunksize[1] : : chunkid[nchunk-1] chunksize[nchunk-1] ------------------------ chunkdata[0] (padding zero to 4 bytes) chunkdata[1] (padding zero to 4 bytes) : : chunkdata[nchunk-1] (padding zero to 4 bytes) ------------------------ 'T''A''P''0' MAGIC flag, TAP document width image width, signed int little endian height image height, signed int little endian codec compression codec used, signed int little endian can be one of the following 0 TAP_CODEC_NONE undefined codec 1 TAP_CODEC_JPEG JPEG image 2 TAP_CODEC_H264 H264 raw video nimage the count of images or the count of frames in animation, signed int little endian delayms array frame delay duration in ms, signed int little endian can be one of the following 0 static image or skipped/hidden frame >0 delay duration in ms nchunk the count of followed data chunks, signed int little endian chunkid chunksize pair array chunk id and corresponding chunk size, signed int little endian chunk id starts from 0 chunkdata array chunk data which length is chunksize, binary padding zero at the end of each chunk data to meet the alignment of 4 bytes