←Select platform

IsSvg(Uri) Method

Summary

Quickly determines whether the URL contains SVG data.

Syntax
C#
VB
C++
public bool IsSvg( 
   Uri uri 
) 
Public Function IsSvg( 
   ByVal uri As System.Uri 
) As Boolean 
public:  
   bool IsSvg( 
      System::Uri^ uri 
   ) 

Parameters

uri

The URL containing the source image data.

Return Value

true if the data is valid SVG; otherwise, false.

Remarks

This method will check the beginning of the file to determine whether it contains valid SVG data. This involves detecting the value <svg> tag and optionally the SVG namespaces. If this method returns true, then the data is most likely an SVG file and can be safely loaded. Note, however, that the data can possibly contain a corrupted or truncated SVG. In such a case, this method will still return true but subsequent calls to loading the SVG will fail.

Requirements
Target Platforms
Help Version 21.0.2021.7.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Codecs Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.