Page 1 of 1

Conversion email-rtf-html - Gif image

Posted: Mon Nov 21, 2011 12:05 pm
by a.amati
Hello,
I have an e-mail with images, I cut & past into Word and save document as .rtf.
When I call saveHtml, the componet generates the correct file and some images .jpg. Some of this images have zero size. saveHtml return false, but I have no way to know why.
I check images, I suppose the ones with zero sizes are some .gif image of the original email that have just one pixel transparent (but I'm not sure). Those file are not referenced into the generated html.

I used TRichviewEdit v.1.9.15.1 with Delphi 7.

Thanks in advance
Alberto

Posted: Mon Nov 21, 2011 12:53 pm
by Sergey Tkachenko
As far as I remember, 1x1 jpeg image can cause problems for TJPEGImage, at least in old versions of Delphi.
Probably, an exception occurs when attempting to save them.

I think the best solution is to save gif images as they are without conversion to jpeg.
To do it, call RV_RegisterHTMLGraphicFormat(TGifImage) one time before the first call of SaveHTML.

Posted: Mon Nov 21, 2011 3:54 pm
by a.amati
I would like a generic solution... I cannot know what the user put into the editor...

In the OnSaveImage2 I try to save myself the .jpg, and it works, and as you say in help file:
"DoDefault - set to False if you saved this image yourself."
... I put DoDefault to false.
No error on savehtml, image correctly generate (just a little bigger) but...
...the html file generated doesn't have any img link...
I have any possibility following this way?

thanks again,
Alberto

Posted: Mon Nov 21, 2011 4:29 pm
by a.amati
update:
If I put the html file generated with DoDefault to true toghether with the images generated with DoDefault to false (saved by myself), everithings works.

Some clue?
thanks,
Alberto

Posted: Mon Nov 21, 2011 6:57 pm
by Sergey Tkachenko
Please send me a project reproducing this problem.

Posted: Tue Nov 22, 2011 9:39 am
by a.amati
I send you an e-mail, I just modify one of your demo...
thanks again
Bye
Alberto

Posted: Tue Nov 22, 2011 4:18 pm
by a.amati
Solved using Location.
Thanks
Alberto