Page 1 of 1
Images illustrated blurred in RichviewEdits
Posted: Thu Sep 16, 2021 9:09 am
by tomr
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.
- BlurredPicture.png (11.88 KiB) Viewed 14698 times
Otherwise, if I open this file in Microsoft Office Word, these two pictures are illustrated correctly.
- NonBlurredPicture.png (24.5 KiB) Viewed 14698 times
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
Re: Images illustrated blurred in RichviewEdits
Posted: Thu Sep 16, 2021 10:24 am
by Sergey Tkachenko
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.
Re: Images illustrated blurred in RichviewEdits
Posted: Thu Sep 16, 2021 11:33 am
by tomr
Thank you for your fast reply and the additional information. I appreciate your help.
Re: Images illustrated blurred in RichviewEdits
Posted: Tue Sep 21, 2021 3:55 pm
by Sergey Tkachenko
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.
- DDBfromMetafiles.png (71.5 KiB) Viewed 14554 times
Re: Images illustrated blurred in RichviewEdits
Posted: Thu Oct 07, 2021 1:41 am
by rizarefaldi
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
waiting for next update because im also getting the same issue.
Re: Images illustrated blurred in RichviewEdits
Posted: Thu Oct 07, 2021 8:17 am
by Sergey Tkachenko
rizarefaldi wrote: ↑Thu Oct 07, 2021 1:41 am
waiting for next update because im also getting the same issue.
Please send me a sample RTF file for testing, to email richviewgmailcom
Re: Images illustrated blurred in RichviewEdits
Posted: Mon Apr 25, 2022 11:57 am
by tomr
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.
- BlurredPicture.png (19.3 KiB) Viewed 9208 times
If you select this image then it is not blurred anymore.
- SelectedPicture.png (19.97 KiB) Viewed 9208 times
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.
- NoProoblem.png (45.04 KiB) Viewed 9208 times
- NoProoblemSelected.png (25.84 KiB) Viewed 9208 times
Are you aware of this problem? Is there anything I can do to solve this?
Best Regards
Tom
Re: Images illustrated blurred in RichviewEdits
Posted: Fri Apr 29, 2022 7:40 pm
by Sergey Tkachenko
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)