Lazarus RVEditDemo, ActionTestUni and image loading issue

General TRichView support forum. Please post your questions here
Post Reply
jgkoehn
Posts: 288
Joined: Thu Feb 20, 2020 9:32 pm

Lazarus RVEditDemo, ActionTestUni and image loading issue

Post by jgkoehn »

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?
Sergey Tkachenko
Site Admin
Posts: 17253
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Lazarus RVEditDemo, ActionTestUni and image loading issue

Post by Sergey Tkachenko »

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.
jgkoehn
Posts: 288
Joined: Thu Feb 20, 2020 9:32 pm

Re: Lazarus RVEditDemo, ActionTestUni and image loading issue

Post by jgkoehn »

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
jgkoehn
Posts: 288
Joined: Thu Feb 20, 2020 9:32 pm

Re: Lazarus RVEditDemo, ActionTestUni and image loading issue

Post by jgkoehn »

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.
Sergey Tkachenko
Site Admin
Posts: 17253
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Lazarus RVEditDemo, ActionTestUni and image loading issue

Post by Sergey Tkachenko »

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.
jgkoehn
Posts: 288
Joined: Thu Feb 20, 2020 9:32 pm

Re: Lazarus RVEditDemo, ActionTestUni and image loading issue

Post by jgkoehn »

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!
JG
Posts: 11
Joined: Tue Nov 30, 2010 11:48 am

Re: Lazarus RVEditDemo, ActionTestUni and image loading issue

Post by JG »

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.
Please can you give it a high level of priority as I need to load metafiles in documents.

Also
TRichView does not support drawing objects yet.


Thanks
rubio.terra
Posts: 1
Joined: Thu May 14, 2020 11:51 am

Re: Lazarus RVEditDemo, ActionTestUni and image loading issue

Post by rubio.terra »

JG wrote: Wed Jul 08, 2020 7:43 am
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.
Please can you give it a high level of priority as I need to load metafiles in documents.

Also
TRichView does not support drawing objects yet.


Thanks
I second that. The good thing is that FPVectorial is distributed along with Lazarus.
Post Reply