AutoCAD 3DMAX C语言 Pro/E UG JAVA编程 PHP编程 Maya动画 Matlab应用 Android
Photoshop Word Excel flash VB编程 VC编程 Coreldraw SolidWorks A Designer Unity3D
 首页 > 网页制作

图片格式整理(增加alcatel)

51自学网 http://www.51zixue.net
铃声图片格式
Motorola
普通铃声格式
【格式】
<Header><Tempo Value><Musical Data><Delimiter><Checksum>

【说明】

Header:       unsigned char 4Byte (所有的铃声都是一样的header)        
   Values:    4c 33 35 26                         -->"L35"
Tempo Value: unsigned char  2Byte 拍子,由1或2或3或4加空格构成,缺省为2,
Values:    32 20                     -->"2 "          
Musical Data:nByte 二进制数据
Delimiter: unsigned char 2 Byte 分隔符   values:  26 26   -->""
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 <byte 2><byte1>
NOKIA
普通铃声格式

普通图片(Operator Logo)
【格式】
<command><otb_bmp >
【说明】
<command> = <UDH><IEI><IEIL><IED>< 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--> 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格式,
<OTA Bitmap> ::= <header> <image-data > [ <palette > ]
<header> ::= <infofield >[extfield]<width><height ><depth>
           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
普通铃声格式
【格式】
<Tp-UDL><TP-UDHL>
<TDD-IEI><TDD-Length><TDD-Name-Length><TDD-Name><TDD-Data_Type><TDD-Data-Length>
< Concatenation -IEI >< Concatenation-Length >< Concatenation-Reference Number >]
< Concatenation-Maximum Number >< Concatenation-Sequence Number >
<TDD-Data>

【说明】

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><Version><DataSize><ReferenceID><ActPacketNumber><NumberOfPackets><ObjectSize> <ObjectType><ObjectName><Data>
---------------------------------------------------------------------------------------------------------------------------------
【说明】
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><Version><DataSize><ReferenceID><ActPacketNumber><NumberOfPackets><ObjectSize> <ObjectType><ObjectName><Data>
-------------------------------------------------------------------------------------------------------------------------------------
【说明】
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文件中拆分出来的数据。

 

 

 
上一篇:Frontpage2000教程 第 二 课 编辑网页  下一篇:Frontpage2000教程 第十二课 站点的发布