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
 SVG Threaded loading
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

zerob

161 Posts

Posted - Oct 25 2024 :  07:58:42  Show Profile  Reply
I try to speed up loading of many svg icons, without blocking the ui.
First i tried with the inbuilt svg capability, which wasn't particularry super fast, and the images don't look smooth.
Also while running the programm in the IDE, i get flooded with GDI+ initialization errors.
"Project Project1.exe raised exception class EIEException with message 'Error creating GDI+ object (#21001)'."

To see if drawing gets any faster or the pictures would look smoother, i then enabled SKIA via IDE context menu and adding the Skia unit, just to see that all images got completely black squares.

i plan to load the image into a TIEBitmap and copy it into a TBitmap inside a TBitmap array (because i later plan to draw it into a TImage quickly with less memory overhead).

ieb.LoadFromFile(fileArray[i]);
ieb.CopyToTBitmap(bmpArray[i]);

First, how can i do this with skia without ending up with black squares (or can't this be done in threads?)
Then, how can i force the native imageen svg to be drawn smooth or prevent the GDI+ errors? (i guess that GDI+ errors prevent the smooth painting)

xequte

38610 Posts

Posted - Oct 25 2024 :  18:20:41  Show Profile  Reply
Hi

The native SVG code is very new (only in its second version in v13.6.0) so I wouldn't expect great things from it for a while yet. It also doesn't support many SVG features.

Can you email me some SVG examples with the code to generate the lack of smoothness and GDI errors, so I can investigate here.


The other methods for rendering SVG in ImageEn, Skia and ImageMagick should both be thread -safe. Can you email me a small demo that reproduces the issue.


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