I am trying to get the wxRichTextCtrl's buffer as HTML string using wxRichTextHTMLHandler. I set handler's flag to wxRICHTEXT_HANDLER_SAVE_IMAGES_TO_BASE64. If I resize the embedded image using Picture Properties Dialog that comes on right clicking the image, It does not add any width or height property in corresponding img html tag. I get original size of image when I load the html in browser.
However this is not the case with xml handler, it does add both properties. I also tried getting wxRichTextBuffer from xml string then read the buffer using html handler but I get same result. It doesn't add height and width properties.
// HTML string from wxRichTextCtrl's buffer
Code: Select all
<html><head></head><body>
<font face="Arial" size="3" color="#000000" ><p align="left"><font face="Arial" size="3" color="#000000" ><font style="color: #0000FF" >this is test</font></font></p>
<p align="left"><font face="Arial" size="3" color="#0000FF" ><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QA/4ePzL8AAAAHdElNRQfgBA0LFx9ZpKm9AAAAT0lEQVQoz2P4z4AfMgwOBQwyDJMZpmKBkxkkIAoYGJIY/mJo/csQw8AAU4CpBCyNrABVCVQaVQEDQwpUCVwaXQFECZI0pgKQkhhk7uAIagABfsbXPDlYlAAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxNi0wNC0xM1QxMToyMzozMiswMjowMA9Vk2wAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTYtMDQtMTNUMTE6MjM6MzErMDI6MDBP4DFNAAAAAElFTkSuQmCC" /></font></p>
</font></body></html>
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<richtext version="1.0.0.0" xmlns="http://www.wxwidgets.org">
<paragraphlayout textcolor="#000000" fontpointsize="11" fontfamily="74" fontstyle="90" fontweight="90" fontunderlined="0" fontface="Arial" alignment="1" parspacingafter="10" parspacingbefore="0" linespacing="10" margin-left="5,4098" margin-right="5,4098" margin-top="5,4098" margin-bottom="5,4098">
<paragraph>
<text textcolor="#0000FF" fontpointsize="11" fontfamily="74" fontstyle="90" fontweight="90" fontunderlined="0" fontface="Arial">this is test</text>
</paragraph>
<paragraph textcolor="#0000FF" fontpointsize="11" fontfamily="74" fontstyle="90" fontweight="90" fontunderlined="0" fontface="Arial">
[b] <image imagetype="15" width="24,4098">[/b]
<data>89504E470D0A1A0A0000000D4948445200000010000000100804000000B5FA37EA0000000467414D410000B18F0BFC6105000000206348524D00007A26000080840000FA00000080E8000075300000EA6000003A98000017709CBA513C00000002624B474400FF878FCCBF0000000774494D4507E0040D0B171F59A4A9BD0000004F4944415428CF63F8CF801F320C0E050C320C9319A66281931924200A18189218FE6268FDCB10C3C0005380A9042C8DAC005509541A550103430A54095C1A5D0144099234A60290921864EEE0086A00017EC6D73C3958940000002574455874646174653A63726561746500323031362D30342D31335431313A32333A33322B30323A30300F55936C0000002574455874646174653A6D6F6469667900323031362D30342D31335431313A32333A33312B30323A30304FE0314D0000000049454E44AE426082</data>
</image>
</paragraph>
</paragraphlayout>
</richtext>
Let me know if there is way to get height and width of image in HTML.
Please suggest.
Thanks,
R