←Select platform

EncodeFromStream Method

Summary

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

Syntax

C#
VB
Java
Objective-C
C++
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 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Svg Assembly