GIF images in RichView

General TRichView support forum. Please post your questions here
Post Reply
Ar4i
Posts: 30
Joined: Tue Apr 24, 2007 7:03 am

GIF images in RichView

Post by Ar4i »

I have a bit of a problem with GIF images in TRichViewEdit - when I insert .GIF image in any document it will get converted to BMP or something - e.g. I insert 10KB b/w GIF and as a result I get a file 200K RVF and 600K RTF!

I'm using Delphi 7 and richview 1.9, is this a known issue or I'm missing something? Perhaps a newer version would solve the problem?
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Which class do you use to support gif images?
Yes, when exporting to RTF, they are converted to bitmaps (if you add a support of PNG images, they may be converted to PNG instead of bitmaps).
But in RVF gifs must be saved as gifs.
Ar4i
Posts: 30
Joined: Tue Apr 24, 2007 7:03 am

Post by Ar4i »

I use the one provided here: http://www.trichview.com/resources/thirdparty/

Is there any way to make RTF files store the GIFs without converting or way to control that process via events or something?

EDIT:
According to http://www.biblioscape.com/rtf15_spec.htm (specification of the RTF format) it seems that GIF is not supported, so I suppose adding GIF would make them incompatible with any other RTF editor.

So the only viable option seems to be PNG - is there a way to make TRichViewEdit to automatically convert any bitmaps in the document to PNG?
Even cycling through all images in the RichView and converting to PNG will do the trick if I can find some code example how to find all images in the document and replace them.

EDIT2: This example was very helpful, I've made some modifications so the pictures would convert to PNG instead of BMP ( http://www.trichview.com/forums/viewtopic.php?t=761 )
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

As for PNG, include rvrtfPNGInsteadOfBitmap in RTFOptions, see http://www.trichview.com/help/idh_trich ... tions.html
But I am afraid this option is not implemented in v1.9, you need to upgrade. For registered users, this upgrade is free.
Ar4i
Posts: 30
Joined: Tue Apr 24, 2007 7:03 am

Post by Ar4i »

Sure I'll upgrade, the only thing that stopped me from doing it is that I have made an extensive changes to the richview actions and I don't want to do them again.
Post Reply