←Select platform

EncodeFromStream Method

Summary

Creates a standard data URI from an image file in a stream.

Syntax
C#
VB
Objective-C
C++
Java
public static string EncodeFromStream( 
   Stream stream 
) 
Public Shared Function EncodeFromStream( _ 
   ByVal stream As Stream _ 
) As String 
+ (nullable NSString *)encodeFromData:(NSData *)data error:(NSError **)error 
public static String encodeFromStream(InputStream stream) 
public: 
static String^ EncodeFromStream(  
   Stream^ stream 
)  

Parameters

stream
Stream containing an image file. Supported image formats are PNG, GIF and JPEG. All other image formats will result in an error.

Return Value

A data URI string containing the media type, encoding and image data encoded as base 64.

Remarks

Refer to Parse for more information about data URIs.

Use EncodeFromFile to create a standard data URI from a file.

Example

For an example, refer to SvgDocument.EnumerateElements

Requirements

Target Platforms

Help Version 20.0.2020.3.31
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Svg Assembly