string型怎么转换成image型?
谢谢大家。

解决方案 »

  1.   

    DELPHI哪有什么Image类型?
    就是数据库的TField也只有TGraphicField,楼主比较强悍,竟然发现了Image类型,看来我已经成了古人了
      

  2.   

    嗯?方图片的不是image型的嘛?
      

  3.   

    FileStream fs = null;
                BinaryWriter bw = null;
                StreamReader sr = null;
                try
                {
                    fs = new FileStream("cc.jpg", FileMode.Create, FileAccess.Write);
                    bw = new BinaryWriter(fs);
                    sr = new StreamReader("bb.txt");
                    while (sr.Peek() != -1)
                    {
                        string tempStr = sr.ReadLine();
                        int tempInt = Convert.ToInt16(tempStr, 16);
                        byte tempByte = Convert.ToByte(tempInt);
                        bw.Write(tempByte);
                    }            }
                catch (Exception exce)
                {                //MessageBox.Show(exce.Message);   
                }
                finally
                {
                    sr.Close();
                    bw.Close();
                    fs.Close();
                } 
    这个方法我实现了的!
      

  4.   

    哦,你是用delphi? 不好意思!
      

  5.   

    二进制数据可以用BASE64编码成字符串,反之亦可