Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

for correct load SVG from stream need adden to public TSVGGraphic in SVGIconImage.pas #53

Open
alex21mir opened this issue Feb 7, 2025 · 0 comments

Comments

@alex21mir
Copy link

class function TSVGGraphic.CanLoadFromStream(Stream: TStream): Boolean;
var
Header: Array[0..4] of AnsiChar;
P: Int64;
TstHdr:ansistring;
begin
P := Stream.Position;
TstHdr:='<?xml';
try
Result := (Stream.Read(Header[0], SizeOf(Header)) = SizeOf(Header)) and
CompareMem(@Header[0], @TstHdr[1], SizeOf(Header));
finally
Stream.Position := P;
end;
end;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant