Version

GetImage(Object,EmbeddableEditorOwnerBase,Object,Stream,Boolean) Method

Gets an image from the val. Val can be an Image instance in which case it will return val. If it's a byte[] then it will try to convert that into an Image using Image.FromStream static method by constructing a stream from the byte array. Returns null if an image can't be constructed from the passed in data.
Syntax
'Declaration
 
Public Overloads Function GetImage( _
   ByVal val As Object, _
   ByVal owner As EmbeddableEditorOwnerBase, _
   ByVal ownerContext As Object, _
   ByRef imageStream As Stream, _
   ByRef disposeImage As Boolean _
) As Image
public Image GetImage( 
   object val,
   EmbeddableEditorOwnerBase owner,
   object ownerContext,
   out Stream imageStream,
   out bool disposeImage
)

Parameters

val
The value to convert into an image
owner
The editor owner
ownerContext
the owner's editor context
imageStream
A stream representation of the image. If the image has a TransparentColor, then the stream must be maintained until the image is disposed.
disposeImage
Returns whether or not the caller is responsible for disposing the image.

Return Value

The image constructed from the owner's value, or null this has failed.
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also