Greetings Forum, Sergey,
I am not sure if I need to change my settings in TRichView or if it is a Lazarus issue.
I am using TRichView 18.3 and Lazarus v2.0.8 r62944
I have tried it in RVEditDemo, and ActionTestUni in both instances the first image appears as a red x the second loads fine. The first image appears to be a shape. Note I was able to load this in a similar app made in Delphi7.1 with no problems.
Here is a test file the file was too large to attach here.
https://drive.google.com/file/d/101komO ... sp=sharing
Thoughts, Ideas?
Lazarus RVEditDemo, ActionTestUni and image loading issue
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Lazarus RVEditDemo, ActionTestUni and image loading issue
For the both pictures, there are two alternative versions in this RTF. The first version is JPEG, and the second version is Windows Metafile.
The second image is stored as typical RTF image, so TRichView can choose between its alternative versions, and it chooses JPEG.
But in the first image, the JPEG part is stored as an MS Word drawing object (you can see the difference if you click these image in MS Word, they are selected differently). TRichView does not support drawing objects yet, so it loads it as a Windows Metafile. Unfortunately, Lazarus does not support Windows Metafiles, so it cannot be loaded.
If you know a third-party implementation of Windows Metafiles for Lazarus, let me know.
The second image is stored as typical RTF image, so TRichView can choose between its alternative versions, and it chooses JPEG.
But in the first image, the JPEG part is stored as an MS Word drawing object (you can see the difference if you click these image in MS Word, they are selected differently). TRichView does not support drawing objects yet, so it loads it as a Windows Metafile. Unfortunately, Lazarus does not support Windows Metafiles, so it cannot be loaded.
If you know a third-party implementation of Windows Metafiles for Lazarus, let me know.
Re: Lazarus RVEditDemo, ActionTestUni and image loading issue
I'm doing some checking.
This appears to be abandoned: https://wiki.freepascal.org/TMetafile_/_TMetafileCanvas
This appears more possible: https://wiki.freepascal.org/fpvectorial
This appears to be abandoned: https://wiki.freepascal.org/TMetafile_/_TMetafileCanvas
This appears more possible: https://wiki.freepascal.org/fpvectorial
Re: Lazarus RVEditDemo, ActionTestUni and image loading issue
Would a work arounf be on an onload of image event that one converts to jpeg, ong etc though I suppose that would require stille wmf support hmmmm.
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Lazarus RVEditDemo, ActionTestUni and image loading issue
Theoretically, fpvectorial can be used to implement an SVG graphic class with possibility to load metafiles.
However, it requires too much work, and I currently have no time for it, sorry.
However, it requires too much work, and I currently have no time for it, sorry.
Re: Lazarus RVEditDemo, ActionTestUni and image loading issue
I understand, maybe in the future. For now we can just convert to image file before saving to rtf out of MS Word. Thanks for your work sir!
Re: Lazarus RVEditDemo, ActionTestUni and image loading issue
Please can you give it a high level of priority as I need to load metafiles in documents.Sergey Tkachenko wrote: ↑Tue Jul 07, 2020 6:26 pm Theoretically, fpvectorial can be used to implement an SVG graphic class with possibility to load metafiles.
However, it requires too much work, and I currently have no time for it, sorry.
Also
TRichView does not support drawing objects yet.
Thanks
-
- Posts: 1
- Joined: Thu May 14, 2020 11:51 am
Re: Lazarus RVEditDemo, ActionTestUni and image loading issue
I second that. The good thing is that FPVectorial is distributed along with Lazarus.JG wrote: ↑Wed Jul 08, 2020 7:43 amPlease can you give it a high level of priority as I need to load metafiles in documents.Sergey Tkachenko wrote: ↑Tue Jul 07, 2020 6:26 pm Theoretically, fpvectorial can be used to implement an SVG graphic class with possibility to load metafiles.
However, it requires too much work, and I currently have no time for it, sorry.
AlsoTRichView does not support drawing objects yet.
Thanks