PDA

View Full Version : QTextEdit HTML Processing of Base64 Images



millsks
24th November 2009, 15:02
Qt 4.5.3 on Mac OS X Leopard
---

I have a project that requires an RTF editor and have a pretty good start...loads images, text formats, etc. What I was wondering was if anyone has had any experience with loading base64 embedded images into the QTextEdit?

Not looking for an answer....just a possible direction to look in.

The image is correctly converted to Base64 and has been tested by opening in a web browser, as well as another RTF editor on the operating system. An example of the 'img' tag is below. I am representing the Base64 data as {BASE64_DATA} to save space.


<img src="data:image/png;base64,{BASE64_DATA}">

We are trying to use embedded images because it would be a nice feature to have just in case someone happens to delete the original image. This way we wouldn't have to worry about it when someone pulls this record from the database.

Just to let you see that the image does load I can send the html file that has the embedded image in there. I cannot attach it due it invalid data format.

To view the html you can access it in the following pastebin:
http://pastebin.mozilla.org/685727

Any advice would be greatly appreciated and thanks in advance.

Kevin