Extracting images from RichTextBox

折月煮酒 提交于 2019-12-01 11:31:49

A picture would look like this:

{\*\shppict {\pict \emfblip ..... }}{\nonshppict {\pict ....}}

or even

{\pict ...}

You can check the rtf of the document containing the picture and write a regular expression to extract the images (replacing them with tokens). Another regex replace can restore the images.

You can use this RTF Converter to extract the images of a RichTextBox using the class RtfVisualImageAdapter.

Check out the examples:

  • RichTextBox: RtfWinForms (Windows Forms), RtfWindows (WPF)
  • Image Handling: Rtf2Html
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!