博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
图片格式整理(增加alcatel)(转)
阅读量:2496 次
发布时间:2019-05-11

本文共 5613 字,大约阅读时间需要 18 分钟。

铃声图片格式
motorola
普通铃声格式
【格式】

【说明】

header: unsigned char 4byte (所有的铃声都是一样的header)

values: 4c 33 35 26 --&gt"l35&"
tempo value: unsigned char 2byte 拍子,由1或2或3或4加空格构成,缺省为2,
values: 32 20 --&gt"2 "
musical data:nbyte 二进制数据
delimiter: unsigned char 2 byte 分隔符 values: 26 26 --&gt"&&"
checksum: 2byte 对musical data进行的校验和,两个字节。方法为对musical data中的数据从前往后对每个字符进行异或运算,运算的结果假设其十六进制的表示为xy,那checksum的第一个字节的十六进制形式为3y,第二个字节的十六进制形式为3x。
计算方式:
step1: calculate one byte xor sum of the all the bytes of the musical data starting after
the space in the tempo value(not including space) till the && (not inclusive of &&). let
us say this is xy.
step 2: separate x and y into two bytes x0 and 0y.
step 3: take 0y and add hex 30. this becomes 3y. call this byte 1.
step 4: take x0 and shift right by 4 bits. this becomes 0x.
step 5: add hex 30 to 0x. this becomes 3x. call this byte 2.
step 6: two byte checksum is
nokia
普通铃声格式

普通图片(operator logo)

【格式】
【说明】
= < mcc> < mnc>
udhi iei ieil ied mcc mnc
06h 05h 04h 1582h 0000h 64f0 00

以上适用于china moblie

udhi: byte length of user-data header define: 06h (用户数据头)

iei: byte information element identifier define; 05h (ie info )
ieil: byte length of iei data define: 04h (ie长度)
ied: unsinge int 2 bytes , octets 4 & 5 define: 5506--&gt 1582h - destination port
ied: unsinge int 2 bytes , octets 6 & 7 define: 0000 - originator port
mcc: (mobile country code), octets 14 and 15, little-endian bcd, filled with f16', 460 -> 64 f0, for chinanotice: to see the logo on the phone's screen, octets 8 and 9 must be defined with the settings of the current operator. (国家代码)
mnc: mobile network code) coding, little-endian bcd, filled with f16', 00->00, for chinamobile is 00, china cugsm is 01 (网络代码)
otb-bmp:otb格式,
::= [ ]
::= [extfield]
infofield 8bit 图片信息区具体表示如下:
bit info field , description
7 分割标志 1:分割图片(后面还有)0:否
6 压缩标志 1:压缩 0:没有压缩
5 扩展调色板 1:使用 0:没有使用
4 max size of icon 1:16bit ,0:8bit
3 number of animated icons, msb
2 number of animated icons
1 number of animated icons
0 number of animated icons,lst

extended infofield 8bit 图片信息区具体表示如下:

bit extfield , description
7 分割标志 1:分割图片(后面还有)0:否
6 bmp版本
5 bmp版本
4 bmp
3 保留
2 保留
1 保留
0 保留

width: 图片的宽度。对于operator log width =72 48h

height: 图片的高度。 对于operator log heigth=14 04h
depth: 图片的深度,灰度值或者颜色数。
image-data:图片点阵
,当图片的大小为72x14时候,每一个byte就表示8个点,一行有72个点,因此每行需要9bytes,由于是14行,因此需要的大小是9x14=126bytes。每一个bit,1表示黑色,0表示白色。
alcatel
普通铃声格式
【格式】
< concatenation -iei >< concatenation-length >< concatenation-reference number >]
< concatenation-maximum number >< concatenation-sequence number >

【说明】

tp-udl byte //短信长度 user data length max:-140

tp-udhl   byte //短信头长度 user data head length
-----------------------------------------------------------------------------------------------------------------
tdd-iei byte //阿尔卡特 sms标示 =80 type ”download”
tdd-length byte // ie length of the tdd_header ----end of ie
tdd-name-length byte //title/name length 标头名字长度
tdd-name unsigned char [tdd-name-length] //标头名称 {字符 }
tdd-data-type byte //tdd_data_type

注释: bit 7:

0: cannot be forwarded
1: can be forwared using ems
如果兼容ems就设置为1
bit 4-6 unused
bit 0-2
000:imelody melody
001:ialcatel melody
010:mseq melody
011:vox melody
100: alcatel picture
101:alcatel animation
110:sms template
111.unused
tdd-data-length = unsigned int 2 byte //tdd_data数据 长度
byte 1: msb
byte 2: lsb
// end of tdd header ie
// start of concatenation header ie //以下只是用于坼分短信
concatenation-iei byte //iei=00
concatenation-length byte //iedl=03
concatenation-reference number byte // 序列号??(same as all segrments)125
concatenation-maximum number byte //总条数 (same as all segrments)
concatenation-sequence number byte //当前序列号
// end of concatenation header ie
// end of user data header

tdd-data = //tdd_data 数据 二进制流

普通图片
(同铃声格式)

siemens
普通铃声格式
【格式】
---------------------------------------------------------------------------------------------------------------------------------
【说明】
identifier: ascii 5 byte 标识。设为”//seo”(注意大小写)(seq stands for siemens exchange object)
version: unsigned char 版本号。设为1
datasize: unsigned int 2 byte 数据大小。每个包里可mid数据的大小,对于同一mid的不同包的该值相同,最后一个包里实际剩余数据大小不足时,添0补足
最大值为:140-22-length(objname)-leng(objtype) in byte
referenceid:unsigned long 4字节 序列号。可自行设定,对同一首mid的不同包的该值相同
actpacketnumber:unsigned int 2字节当前包是第几包。从1开始计数
numberofpackets:unsigned int 2字节 总包数。
objectsize:unsigned long 4字节mid的大小。the total of the dataobject in byte
objecttype:string 1byte+x (x>0) 类型为mid。。第一字节为长度,因为类型为”mid”所以第一字节为3,第二至第四字节为”mid”
objectnam string 1byte+y mid的名称,包括扩展名。长度不定。第一个字节为长度。如歌曲为”甜蜜蜜.mid”,则objectname的长度为10,第一个字节为10。第二至十个字节为” 甜蜜蜜.mid”
resulting size: 22 byte +x+y
data:mid数据。从mid文件中拆分出来的数据。
普通图片
【格式】
-------------------------------------------------------------------------------------------------------------------------------------
【说明】
identifier: ascii 5 byte 标识。设为”//seo”(注意大小写)(seq stands for siemens exchange object)
version: unsigned char 1 byte 版本号。设为1
datasize: unsigned int 2 byte 数据大小。每个包里可bmp数据的大小,对于的不同包的该值相同,最后一个包里实际剩余数据大小不足时,添0补足
最大值为:140-22-length(objname)-leng(objtype) in byte
referenceid:unsigned long 4字节 序列号。可自行设定,对同一副图片的不同包的该值相同
actpacketnumber:unsigned int 2字节当前包是第几包。从1开始计数
numberofpackets:unsigned int 2字节 总包数。
objectsize:unsigned long 4字节mid的大小。the total of the dataobject in byte
objecttype:string 1byte+x (x>0) 类型为bmp。。第一字节为长度,因为类型为”bmp”所以第一字节为3,第二至第四字节为”bmp”
objectname string 1byte+y mid的名称,包括扩展名。长度不定。第一个字节为长度。如歌曲为”1234.bmp”,则objectname的长度为8,第一个字节为8。第二至十个字节为”1234.bmp”
resulting size: 22 byte +x+y
data:mid数据。从bmp文件中拆分出来的数据。

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10294527/viewspace-125491/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/10294527/viewspace-125491/

你可能感兴趣的文章
MongoDB基本语法和操作入门
查看>>
学习笔记_vnpy实战培训day04_作业
查看>>
OCO订单(委托)
查看>>
学习笔记_vnpy实战培训day06
查看>>
回测引擎代码分析流程图
查看>>
Excel 如何制作时间轴
查看>>
股票网格交易策略
查看>>
matplotlib绘图跳过时间段的处理方案
查看>>
vnpy学习_04回测评价指标的缺陷
查看>>
ubuntu终端一次多条命令方法和区别
查看>>
python之偏函数
查看>>
vnpy学习_06回测结果可视化改进
查看>>
读书笔记_量化交易如何建立自己的算法交易01
查看>>
设计模式03_工厂
查看>>
设计模式04_抽象工厂
查看>>
设计模式05_单例
查看>>
设计模式06_原型
查看>>
设计模式07_建造者
查看>>
设计模式08_适配器
查看>>
设计模式09_代理模式
查看>>