Conversion email-rtf-html - Gif image

General TRichView support forum. Please post your questions here
Post Reply
a.amati
Posts: 5
Joined: Mon Nov 21, 2011 9:02 am

Conversion email-rtf-html - Gif image

Post 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
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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.
a.amati
Posts: 5
Joined: Mon Nov 21, 2011 9:02 am

Post 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
a.amati
Posts: 5
Joined: Mon Nov 21, 2011 9:02 am

Post 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
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Please send me a project reproducing this problem.
a.amati
Posts: 5
Joined: Mon Nov 21, 2011 9:02 am

Post by a.amati »

I send you an e-mail, I just modify one of your demo...
thanks again
Bye
Alberto
a.amati
Posts: 5
Joined: Mon Nov 21, 2011 9:02 am

Post by a.amati »

Solved using Location.
Thanks
Alberto
Post Reply