待转内容:
000000000000000000000000000000000000000000000000000000000000000000000000000000000001010202020304050607090B0E1114191E252D353F4B576472808E9BA8B4BFC8D0D4D8D9D7D4D0CBC5BFB9B0A89F968E878079736D67625D5A575552504E4C4A484644423F3D3A38363433312F2D2C2A28262422211F1E1D1C1B1A1919181716161514131211100F0E0D0D0D0D0C0C0C0B0B0A09090808070706060707070606060505050404040404040404040303030303030302020202020202020202020202010101010101010101010101010000000000000000000000000000000000000000000000000000000000000000000000000000000000
16进制转10进制
var NEWBE = new byte[imageData.Length/2];
for (int i = 0; i < imageData.Length/2; i++)
{
string djsak = imageData.Substring(i * 2);
NEWBE[i] = byte.Parse(imageData.Substring(i*2,2), System.Globalization.NumberStyles.AllowHexSpecifier);
}
画图
//画图初始化
Bitmap bMap = new Bitmap(500, 500);
Graphics gph = Graphics.FromImage(bMap);
gph.Clear(Color.White);
PointF cPt = new PointF(40, 420);
PointF[] xPt = new PointF[3]{
new PointF(cPt.Y+15,cPt.Y),
new PointF(cPt.Y,cPt.Y-8),
new PointF(cPt.Y,cPt.Y+8)};
PointF[] yPt = new PointF[3]{
new PointF(cPt.X,cPt.X-15),
new PointF(cPt.X+8,cPt.X),
new PointF(cPt.X-8,cPt.X)};
gph.DrawLine(Pens.Black, cPt.X, cPt.Y, cPt.Y, cPt.Y);
gph.DrawPolygon(Pens.Black, xPt);
gph.FillPolygon(new SolidBrush(Color.Black), xPt);
gph.DrawLine(Pens.Black, cPt.X, cPt.Y, cPt.X, cPt.X);
gph.DrawPolygon(Pens.Black, yPt);
gph.FillPolygon(new SolidBrush(Color.Black), yPt);
Point[] pis = new Point[NEWBE.Length];
for (int i = 1; i <= NEWBE.Length; i++)
{
if (i < 8)
{
gph.DrawString((i * 50).ToString(), new Font("宋体", 11), Brushes.Black,
new PointF(cPt.X + i * 50, cPt.Y));
gph.DrawLine(Pens.Black, cPt.X + i * 50, cPt.Y+3, cPt.X + i * 50, cPt.Y);
}
//画折线
if (i > 1)
gph.DrawLine(Pens.Red, cPt.X + ((i - 1)) , cPt.Y - d[i - 2] , cPt.X + i , cPt.Y - d[i - 1] );
}
//保存输出图片
bMap.Save("D:\\testS.bmp");