title: Can't insert a picture into RichTextBox
body: <p>I want to insert a picture into a RichTextBox. I add the picture in coding.</p>
  
  <p>This is the major code, adding a jpg image:</p>
  
  <pre><code>MemoryStream memoryStream = new MemoryStream();
  img.Save(memoryStream,System.Drawing.Imaging.ImageFormat.Jpeg);
  byte[] bytes = memoryStream.ToArray();
  String width = img.Width.ToString();
  String height = img.Height.ToString();
  String hexImgStr=BitConverter.ToString(bytes, 0).Replace("-","");
  String picStr=@"{\pict\jpegblip\picw"+width+@"\pich"+height+
                @"\picwgoal"+width+@"\pichgoal"+height+" "+hexImgStr+"}";
  </code></pre>
  
  <p>Then I insert the "picStr" to the rtf document. But the image can't be seen. I thought "hexImgStr" maybe wrong. I also generate the "hexImgStr" in another way:</p>
  
  <pre><code>FileStream fs = new FileStream(imgPath,FileMode.Open);
  BinaryReader br=new BinaryReader(fs);
  //byte[] bytes=new byte[fs.Length];
  String hexImgStr="";
  for (long i = 0; i &lt; fs.Length; i++)
  {
      //bytes[i] = br.ReadByte();
      hexImgStr +=Convert.ToString(br.ReadByte(),16);
  }
  </code></pre>
  
  <p>The image can't be seen either. What's wrong with it.</p>
  
  <p>Thanks a lot.</p>