在我的rtf文档中,我想从字符串中提取图像: 字符串如下:
\pard\pard\qc{\*\shppict{\pict\pngblip\picw320\pich192\picwgoal0\pichgoal0
89504e470d0a1a0a0000000d4948445200000140000000c00802000000fa352d9100000e2949444[.....]6c4f0000000049454e44ae426082
}}
问题: 1) 这真的是base64吗?在
2)如何使用下面的代码解码。?在
^{pr2}$完整的rtf文本(保存为.rtf时显示图像)位于:
不,那不是Base64编码的数据。它是十六进制的。从Wikipedia article on the RTF format:
^{} function 将为您解码回二进制图像数据;这里有一个PNG图像:
当然,
\pngblip
条目就是其中的一条线索。我不会在这里包括图像,这是一个相当单调的8位320x192黑色矩形。在相关问题 更多 >
编程相关推荐