ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 TImageEnMView and SVG
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

Ken Randall

33 Posts

Posted - Apr 06 2022 :  05:50:11  Show Profile  Reply
Hi,

Any possibility of being able to view SVG files?

Thanks,

Ken R

xequte

38608 Posts

Posted - Apr 06 2022 :  05:52:06  Show Profile  Reply
Hi Ken

SVG can be loaded (as a rasterized bitmap) using the ImageMagick plug-in:

www.imageen.com/download/


Nigel
Xequte Software
www.imageen.com
Go to Top of Page

Ken Randall

33 Posts

Posted - Apr 06 2022 :  06:29:41  Show Profile  Reply
Hi Nigel,

Thanks. Do the dll's just have to be in the exe folder and do I need all of them to view the svg in the MView or do I need to configure the MView in any way?

Thanks,

Ken R
Go to Top of Page

xequte

38608 Posts

Posted - Apr 06 2022 :  17:59:20  Show Profile  Reply
Hi Ken

You just need to add all of the files in the ImageMagick zip to your EXE folder.

For completeness, you should also explicitly register the plug-in when your app starts:

https://www.imageen.com/help/TIEImageEnGlobalSettings.RegisterPlugIns.html

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

Ken Randall

33 Posts

Posted - Apr 07 2022 :  07:29:51  Show Profile  Reply
Hi Nigel,

I have copied all dll's to the exe folder and have included:

IEGlobalSettings().RegisterPlugIns([iepiImageMagick]);
if not (iepiImageMagick in IEGlobalSettings().ActivePlugIns) then
ShowMessage('ImageMagick not found!');

and I do not get a message so must be registered but images are not appearing in the MView. I am using:

MView.LockUpdate;
MView.FillFromDirectory(MyFolder,TIEFolderFileTypes.iefAllImages);
MView.UnLockUpdate;

Regards,



Ken R
Go to Top of Page

xequte

38608 Posts

Posted - Apr 08 2022 :  22:11:27  Show Profile  Reply
Hi Ken

Can you try this demo:

\Demos\InputOutput\ImageMagick\ImageMagick.dpr

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

Ken Randall

33 Posts

Posted - Apr 09 2022 :  04:50:34  Show Profile  Reply
Hi Nigel,

Are we talking cross-purposes here? The ImageMagick demo does not use a TImageEnMView!

Regards,

Ken R
Go to Top of Page

xequte

38608 Posts

Posted - Apr 10 2022 :  16:48:37  Show Profile  Reply
Hi Ken

Can you confirm that SVG types display for you in that demo?

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

Ken Randall

33 Posts

Posted - Apr 11 2022 :  04:45:44  Show Profile  Reply
Hi Nigel,

Yes, it works fine in that demo.

Thanks,

Ken R
Go to Top of Page

xequte

38608 Posts

Posted - Apr 11 2022 :  18:27:08  Show Profile  Reply
Thanks Ken,

Looks like TImageEnMView is not detecting SVG as a known load extension, unless DetectFileFormat is true.

We'll have a fix in the next update. Meanwhile you can just enable the DetectFileFormat parameter:

ImageEnMView1.FillFromDirectory( IEFolderTree1.Folder, -1, False, '', True, '', False );


Nigel
Xequte Software
www.imageen.com
Go to Top of Page

Ken Randall

33 Posts

Posted - Apr 12 2022 :  00:16:14  Show Profile  Reply
Hi Nigel,

Thanks very much. That works perfectly.

Regards,

Ken R
Go to Top of Page

xequte

38608 Posts

Posted - Nov 27 2023 :  15:58:27  Show Profile  Reply
Also note that SVG loading is now automatically supported on Delphi 12 and newer if you add Vcl.Skia to the uses clause of any unit in your project.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: