Page 1 of 1
GIF images in RichView
Posted: Thu Jan 22, 2009 4:40 pm
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?
Posted: Thu Jan 22, 2009 5:10 pm
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.
Posted: Fri Jan 23, 2009 8:08 am
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 )
Posted: Fri Jan 23, 2009 7:09 pm
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.
Posted: Mon Jan 26, 2009 8:33 am
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.