Image bloat in RTF files
Posted: Mon Aug 13, 2012 7:43 am
Hi Sergey,
Been having an issue with tRichView and RTF files containing embedded images. I did a little research and found the problem.
Problem:
TRichView
-RTFReadProperties
when the ExtractMetafileBitmaps property is set to False
the tRichview component will use the original image embedded in the RTF but if the WMF image is missing from the RTF it then fails to retrieve the image (even though it wouldn't use WMF anyway).
This should not be the case, it should still retrieve the original image. For those of us using RTFs with embedded images fixing this would reduce the files size of the RTF files significantly.
Background:
On a PC when you add images to an RTF file, the image gets stored in the RTF file as a WMF, uncompressed. Which cause the file size to jump up dispportionally to the original image size.
You can turn off the creation of the WMF in MS Word by changing a registry value as described here:
Document file size increases with EMF, PNG, GIF, or JPEG graphics in Word
This fixes the bloating problem with images in RTF files but due to the issue mentioned above tRichView has issues.
Other references:
How to reduce size of RTF with embedded images?
Best regards,
Steven
Been having an issue with tRichView and RTF files containing embedded images. I did a little research and found the problem.
Problem:
TRichView
-RTFReadProperties
when the ExtractMetafileBitmaps property is set to False
the tRichview component will use the original image embedded in the RTF but if the WMF image is missing from the RTF it then fails to retrieve the image (even though it wouldn't use WMF anyway).
This should not be the case, it should still retrieve the original image. For those of us using RTFs with embedded images fixing this would reduce the files size of the RTF files significantly.
Background:
On a PC when you add images to an RTF file, the image gets stored in the RTF file as a WMF, uncompressed. Which cause the file size to jump up dispportionally to the original image size.
You can turn off the creation of the WMF in MS Word by changing a registry value as described here:
Document file size increases with EMF, PNG, GIF, or JPEG graphics in Word
This fixes the bloating problem with images in RTF files but due to the issue mentioned above tRichView has issues.
Other references:
How to reduce size of RTF with embedded images?
Best regards,
Steven