Hello Richview Support,
I got the following issue: I have an RTF-File, which contains text and two small images. If I open this file in your RichViewEdit Demo (https://www.trichview.com/download/demo.html), these two pictures are illustrated blurred.
Otherwise, if I open this file in Microsoft Office Word, these two pictures are illustrated correctly.
Are you aware of this issue? Is there anything I can do to solve this?
Attached you can find the RTF-File.
Best Regards
Tom
Images illustrated blurred in RichviewEdits
Images illustrated blurred in RichviewEdits
- Attachments
-
- Test.zip
- RTF-File
- (55.7 KiB) Downloaded 1094 times
-
- Site Admin
- Posts: 17522
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Images illustrated blurred in RichviewEdits
TRichViewEdit can display scaled pictures at high-quality for raster pictures, such as bitmaps, jpegs, png, gif, tiff.
However, pictures in your file are loaded as metafiles. TRichViewEdit displays metafiles as they are (using TMetafile.StretchDraw), so high-quality scaling algorithm is not applied.
When TRichViewEdit reads RTF files, it checks all metafiles, and, if they contain only a bitmap inside, extract this bitmap and insert it instead of a metafile. But it does not happen for your RTF. This means that metafiles in your RTF contain some commands that make TRichViewEdit think that these not are simple metafile wrappers for images. I'll check while it happens till the end of this week.
However, pictures in your file are loaded as metafiles. TRichViewEdit displays metafiles as they are (using TMetafile.StretchDraw), so high-quality scaling algorithm is not applied.
When TRichViewEdit reads RTF files, it checks all metafiles, and, if they contain only a bitmap inside, extract this bitmap and insert it instead of a metafile. But it does not happen for your RTF. This means that metafiles in your RTF contain some commands that make TRichViewEdit think that these not are simple metafile wrappers for images. I'll check while it happens till the end of this week.
Re: Images illustrated blurred in RichviewEdits
Thank you for your fast reply and the additional information. I appreciate your help.
-
- Site Admin
- Posts: 17522
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Images illustrated blurred in RichviewEdits
In your RTF, metafiles contain device dependent bitmaps (DDB) inside.
In the current version, TRichView supports only extraction of device independent bitmaps (DIB) from metafiles.
I implemented DDB support, it will be included in the next update.
In the current version, TRichView supports only extraction of device independent bitmaps (DIB) from metafiles.
I implemented DDB support, it will be included in the next update.
-
- Posts: 2
- Joined: Sun Oct 03, 2021 2:49 pm
Re: Images illustrated blurred in RichviewEdits
waiting for next update because im also getting the same issue.Sergey Tkachenko wrote: ↑Tue Sep 21, 2021 3:55 pm In your RTF, metafiles contain device dependent bitmaps (DDB) inside cara membuat nomor halaman di word
In the current version, TRichView supports only extraction of device independent bitmaps (DIB) from metafiles.
I implemented DDB support, it will be included in the next update.
DDBfromMetafiles.png
-
- Site Admin
- Posts: 17522
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Images illustrated blurred in RichviewEdits
Please send me a sample RTF file for testing, to email richviewgmailcomrizarefaldi wrote: ↑Thu Oct 07, 2021 1:41 am waiting for next update because im also getting the same issue.
Re: Images illustrated blurred in RichviewEdits
Hello, again RichviewSupport,
I got another problem with blurred images in Richviewedits.
Attached you can find a zip file containing an email. In this email, you can find an image(gif file).
If you open the email and copy this image directly into a Richviewedit then it is displayed blurred. If you select this image then it is not blurred anymore. If you save the image from the email to the desktop and paste it from there into the Richviewedit then the problem does not occur. Are you aware of this problem? Is there anything I can do to solve this?
Best Regards
Tom
I got another problem with blurred images in Richviewedits.
Attached you can find a zip file containing an email. In this email, you can find an image(gif file).
If you open the email and copy this image directly into a Richviewedit then it is displayed blurred. If you select this image then it is not blurred anymore. If you save the image from the email to the desktop and paste it from there into the Richviewedit then the problem does not occur. Are you aware of this problem? Is there anything I can do to solve this?
Best Regards
Tom
-
- Site Admin
- Posts: 17522
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Images illustrated blurred in RichviewEdits
When you insert GIF image (or drag and drop from desktop), the image will be loaded in TGifImage.
When you paste from MS Outlook, it is pasted as RTF. RTF file contains two alternative representations of this image: as a PNG and as a metafile (RTF format cannot contain GIF images). TRichViewEdit chooses PNG.
I attached this PNG file that I extracted from RTF.
When you load this PNG file, it is loaded in TPngImage. And TPngImage displays some colors as semitransparent (when you select this image in TRichViewEdit, you can see a selection highlighting through the image).
I do not know why it displays it in this way, other graphic editors do not display this transparency.
Sorry, I do not know how to fix it (maybe only using alternative graphic classes for PNG, such as DevExpress images)
When you paste from MS Outlook, it is pasted as RTF. RTF file contains two alternative representations of this image: as a PNG and as a metafile (RTF format cannot contain GIF images). TRichViewEdit chooses PNG.
I attached this PNG file that I extracted from RTF.
When you load this PNG file, it is loaded in TPngImage. And TPngImage displays some colors as semitransparent (when you select this image in TRichViewEdit, you can see a selection highlighting through the image).
I do not know why it displays it in this way, other graphic editors do not display this transparency.
Sorry, I do not know how to fix it (maybe only using alternative graphic classes for PNG, such as DevExpress images)
- Attachments
-
- 1.png (2.47 KiB) Viewed 8823 times