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
 Replacing SVG file loader
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

rmklever

Norway
53 Posts

Posted - Jan 04 2026 :  07:51:51  Show Profile  Reply
I am trying to replace the default SVG file loader with another SVG file loader. How can I change default SVG file loader to my own I am trying to use the following code:


const
  ioSVG = ioUSER + 782; // to get a unique FileType number contact support@xequte.com

  procedure RegisterSVG();
  procedure ReadSVG(Stream: TStream; Bitmap: TIEBitmap; var IOParams: TIOParams; var Progress: TProgressRec; Preview: boolean);
  function  TrySVG(Stream: TStream; TryingFormat:TIOFileType): boolean;

procedure RegisterSVG();
var ff: TIEFileFormatInfo;
begin
  ff:= TIEFileFormatInfo.Create;
  ff.FileType:= ioSVG;
  ff.FullName:= 'Scalable Image Format';
  ff.Extensions:= 'svg';
  ff.InternalFormat:= True;
  ff.ReadFunction:= ReadSVG;
  ff.WriteFunction:= nil;
  ff.TryFunction:= TrySVG;
  IEFileFormatADD(ff);
end;


The ReadSVG is my routine for loading a SVG file and convert it to a Imageen Bitmap.

It is working for other file formats I have added like QOI and others but not for SVG and I need this for my thumbs browser.

Any ideas?


Roy M Klever
Klever on Delphi - www.rmklever.com

xequte

39297 Posts

Posted - Jan 05 2026 :  16:37:43  Show Profile  Reply
Hi Roy

Did you try removing the ioSVG format:

https://www.imageen.com/help/IEFileFormatRemove.html

And then adding SVG as a custom format, e.g.

iormkSVG = 10001;


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