svg support in Web Core

Hello,

when I assign a svg the Picture property of a TWebImageControl it loads fine at design time, but I have this compilation error :

[Error] Unit2.pas(7): can't find unit "Vcl.Skia"

I notice that the value of the property is a TSkSvgGraphic

I can avoid using skia library by installing FNC core, then the value of picture is a TTMSFNCSVGBitmap, but is there another solution ?

note : this only happens at design time, if I assign a svg at runetime, I don't have any issue

 MyWebImageControl.Picture.Data := 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0ia  ...'; // works fine 

I use WebCore 2.4.5, Delphi 12 (version 29.0.50491.5718 ) , windows 10 updated

thanks

sorry, I made a mistake, for the runtime assignment, I meant

MyWebImageControl.URL := 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0ia  ...'; // works fine

but anyway, the issue is not there.

To begin with, I do not understand the error : 'can't find unit Vcl.Skia' as this (stub) unit IS in the TMS WEB Core "Core Source" subfolder when you have a clean install of TMS WEB Core v2.4.5.0
Please verify that you do not have old versions around and that your TMS WEB Core library path is correct.

It's strange : the TMS Web Core library path is empty.
When I try to add the Core Source folder, I have an Access violation error in module 'coreide290.bpl'

As I had also other compilation error since I updated to Web Core 2.4.5, to avoid confusion I started a new fresh install, on a virtual machine running in Parallels Desktop. So everything is reinstalled : Windows 10 (and updates), Delphi 12 Architect, and Web Core 2.4.5, that's it.

so I edited the TMS Web Core library path with :

C:\TMS\TMS WEB Core RSXE15\Core Source;C:\TMS\TMS WEB Core RSXE15\Core Source\RTL

and checked my Option/Language/Delphi/Library/Library Path :

$(BDSLIB)$(Platform)\release;$(BDSUSERDIR)\Imports;$(BDSUSERDIR)\Imports$(Platform);$(BDS)\Imports;$(BDSCOMMONDIR)\Dcp;$(BDS)\include;
C:\TMS\TMS WEB Core RSXE15;C:\TMS\TMS WEB Core RSXE15\Win32;C:\TMS\TMS WEB Core RSXE15\Component Library Source

but still I have this error :

[Error] Unit1.pas(7): can't find unit "Vcl.Skia"

Do you see the unit Vcl.skia.pas in your "Core Source" folder?

yes it's there..

Then it should find it if the TMS WEB Core library path is correct.

I suppose it's normal that the file is empty, it's a stub, right ?

unit VCL.Skia;

interface

implementation

end.

Yes it is because it is not needed at runtime in the browser

I cannot figure out where is the pb, as the file Vcl.Skia.pas exists in both Design Time and Runtime locations.

maybe I could have missed something in the TMS Web Options ?
here my settings

also my Language / Delphi / Library folders

I notice also that I cannot add a path (in the TMS Web Option / Library path) using the path list editor, but I can do it with editing the textfield manually.
Capture d’écran 2024-01-19 à 20.23.11
(Replacing or Deleting a path doesn't raise this error, but the dropdown menu 'Tasks' also raises it)

thanks

Are you sure there are no more old version files of TMS WEB Core around on your system. I suggest to do first a full uninstall via the Windows Control Panel Add/Remove software. Then verify in the Delphi IDE, there are no more traces of TMS WEB Core (Component/Install Packages) and then reinstall the latest version v2.4.5.1

thanks, I just did it (again) but it doesn't solve the problem, still have :

[Error] Unit1.pas(7): can't find unit "Vcl.Skia"

I could try to reinstall everything, but i'm not convinced to spend time doing again the same thing the same way, as I just re-installed everything on a new virtual machine. my setup :

Parallels Desktop 18 running on Catalina 10.15.7,
Windows 10 Pro (20H2, build 19042.1706, Experience Pack 120.2212.4170.0)
Delphi 12 Version 29.0.50491.5718
TMS Web Core 2.5.4.1

any other ideas ?

attached the minimalist project that I can't compile, it's just a TWebImageControl with a svg assigned.
02 test bug skia.zip (7.7 KB)

thank you,

Then remove Vcl.skia from uses list, it is not needed.

already removed, but it's re-added automatically when I save or compile .

We investigated deeper and applied a fix. Next update v2.4.5.2 will have this fix

1 Like