Extract a image from RTF ? WMF > BMP
Hi,
I use this code to export a selected image in a rtf file to BMP...
VB Code:
If is_image(fMainForm.RichText2.SelRTF) = True Then
SendMessage fMainForm.RichText2.hwnd, WM_COPY, 0, 0
fMainForm.Picture6.Picture = Clipboard.GetData()
fMainForm.Picture6.Refresh
SavePicture fMainForm.Picture6.Picture, App.Path & "\Temp\object_" & Str(lngCurText&) & ".bmp"
strHTML$ = strHTML$ & "<img src=object_" & Str(lngCurText&) & ".bmp>"
End If
But when I try to open the extracted BMP is MS PAINT or some other pic editor it says invalid format ....... The browser does not display the image either .....
Can some one please help me ?
Windows Explorer shows a preview of the invalid BMP...
Windows Explorer shows a preview of the invalid BMP...
But I can't open it in MSPaint ...... or MS Photo Editor....
I have a code that converts BMP to JPEG ........ but even that won't work with this Invalid BMPs ..........