#include
#include
usingnamespacestd;
typedefunsignedcharbyte;
/*
class PngMsg
{
private :
unsigned char markMsg[8]; //十进制,相当于16进制89.50.4e.47.0d.0a.1a.0a;
char widthloc;
char heigtMsgloc;
char BitDepthloc;//图像深度
char ColorTypeloc;
char CompressionMethodloc;//压缩方法(LZ77派生算法)
char FilterMethodloc;//滤波器方法
char InterlaceMethodloc;
public:
PngMsg()
{
markMsg[0] = 137;markMsg[1] = 80; markMsg[2] = 78;markMsg[3] = 71; markMsg[4] = 13;markMsg[5] = 10; markMsg[6] = 26; markMsg[7] = 10;
widthloc = 'a';
heigtMsgloc = 'b';
BitDepthloc = 'c';//图像深度
ColorTypeloc = 'd';
CompressionMethodloc = 'e';//压缩方法(LZ77派生算法)
FilterMethodloc = 'f';//滤波器方法
InterlaceMethodloc = 'g';
}
long int getMsg(char loc)
{
if (loc == 'a')return 0x10;
if (loc == 'b')return 0x14;
if (loc == 'c')return 0x15;
if (loc == 'd')return 0x16;
if (loc == 'e')return 0x17;
if (loc == 'f')return 0x18;
if (loc == 'g')return 0