插入 CRichEditCtrl 时如何保持原始图像格式?
我在此页面中使用了 COleRichEditCtrl 类 http://www.codeproject.com/KB/edit /COleRichEditCtrl.aspx 所以我可以使用 copy & 将图像插入到 CRichEditCtrl 中。粘贴。 但是,当我粘贴图像时,它似乎会自动将图像转换为未压缩的 WMF 格式。结果,当我复制一张500KB大小的JPG并将其粘贴到控件中,然后使用StreamOut()将内容存储到.rtf文件中时,文件大小将有6MB大!这当然是不可接受的。那么有没有办法保持图像的原始格式,从而使尺寸不会增大呢?非常非常感谢!
I used the COleRichEditCtrl class in this page http://www.codeproject.com/KB/edit/COleRichEditCtrl.aspx
So I can insert an image into the CRichEditCtrl using copy & paste.
However, it appears that it will automatically convert the image into an uncompressed WMF format when i paste the image. As a result, when I copy a JPG of size 500KB and paste it into the control, then use StreamOut() to store the content into a .rtf file, the file size will be as large as 6MB!! This is certainly unacceptable. So is there a way to keep the original format of the image so the size doesn't boost? Many many thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
无论您在 RichEdit 控件中复制和粘贴什么内容,在保存该文件时,它总是将内容转换为 RTF 格式。如果仅链接图像文件,文档的大小将会非常小。但如果将其嵌入到文档中,大小将会增加。没有其他选择。
Whatever you copy and paste in the RichEdit control, while saving that file, it always convert the content into RTF format. If you only link the image file, the size of your document will be very small. But if you embed it in your document, the size will increase. There is no other option.