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