Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » RichText,QTF,RTF... » how to get image from richtext?
icon14.gif  how to get image from richtext? [message #43989] Tue, 09 December 2014 09:59 Go to next message
akebee is currently offline  akebee
Messages: 90
Registered: August 2011
Location: China
Member
RichEdit editor;
SaveFile("test.qtf", editor.GetQTF());

i pasted some images into the editor, the "SaveFile" can save them;
Look at the test.qtf,the data is like below:

[ $$0,0#00000000000000000000000000000000:Default]
[{_}
[s0;
@@image:1158&1392
(A24BuwEAAAAAAAAAAHic7d37V1vnne9x/pL+OrPK...

so how can i get these images from the richtext? Shocked
Re: how to get image from richtext? [message #43997 is a reply to message #43989] Wed, 10 December 2014 08:24 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
akebee wrote on Tue, 09 December 2014 09:59
RichEdit editor;
SaveFile("test.qtf", editor.GetQTF());

i pasted some images into the editor, the "SaveFile" can save them;
Look at the test.qtf,the data is like below:

[ $$0,0#00000000000000000000000000000000:Default]
[{_}
[s0;
@@image:1158&1392
(A24BuwEAAAAAAAAAAHic7d37V1vnne9x/pL+OrPK...

so how can i get these images from the richtext? Shocked


What you mean by "get"? At user level? Get into editor, do copy - paste.

Programatically? That is harder, I guess at this level the easiest way is to use RichText::Iterator.

Mirek
Re: how to get image from richtext? [message #43998 is a reply to message #43997] Wed, 10 December 2014 09:14 Go to previous message
akebee is currently offline  akebee
Messages: 90
Registered: August 2011
Location: China
Member
it's seemed hard to use RichText::Iterator Sad

String s = EncodeRTF(ParseQTF(qtf),CHARSET_UTF8);

SaveFile("output.rtf",s);

Perhaps I should encode it to RTF or HTML,
but the EncodeHtml function are so many paramenters, i don`t have css .
Previous Topic: link option static lib?
Next Topic: QTF to ODF (Open Document Format) converter
Goto Forum:
  


Current Time: Fri Mar 29 08:02:01 CET 2024

Total time taken to generate the page: 0.01646 seconds