Extracting images from RichTextBox

后端 未结 2 1400
醉梦人生
醉梦人生 2021-01-14 13:35

I have an application where users may insert images into a RichTextBox. I\'d like to be able to replace all the images in the RTF with some token and store the images in se

2条回答
  •  悲&欢浪女
    2021-01-14 13:57

    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.

提交回复
热议问题