BitmapExtensionToImageTColor, TDepth Method |
http://www.emgu.com
Create an Image < TColor, TDepth > from Bitmap
Namespace:
Emgu.CV
Assemblies:
Emgu.CV.Platform.NetCore (in Emgu.CV.Platform.NetCore.dll) Version: 4.3.0.3890
Emgu.CV.Platform.NetFramework (in Emgu.CV.Platform.NetFramework.dll) Version: 4.3.0.3890 (4.3.0.3890)
Syntaxpublic static Image<TColor, TDepth> ToImage<TColor, TDepth>(
this Bitmap bitmap
)
where TColor : struct, new(), IColor
where TDepth : new()
<ExtensionAttribute>
Public Shared Function ToImage(Of TColor As {Structure, New, IColor}, TDepth As New) (
bitmap As Bitmap
) As Image(Of TColor, TDepth)
public:
[ExtensionAttribute]
generic<typename TColor, typename TDepth>
where TColor : value class, gcnew(), IColor
where TDepth : gcnew()
static Image<TColor, TDepth>^ ToImage(
Bitmap^ bitmap
)
[<ExtensionAttribute>]
static member ToImage :
bitmap : Bitmap -> Image<'TColor, 'TDepth> when 'TColor : struct, new() and IColor when 'TDepth : new()
Parameters
- bitmap
- Type: System.DrawingBitmap
[Missing <param name="bitmap"/> documentation for "M:Emgu.CV.BitmapExtension.ToImage``2(System.Drawing.Bitmap)"]
Type Parameters
- TColor
[Missing <typeparam name="TColor"/> documentation for "M:Emgu.CV.BitmapExtension.ToImage``2(System.Drawing.Bitmap)"]
- TDepth
[Missing <typeparam name="TDepth"/> documentation for "M:Emgu.CV.BitmapExtension.ToImage``2(System.Drawing.Bitmap)"]
Return Value
Type:
ImageTColor,
TDepth[Missing <returns> documentation for "M:Emgu.CV.BitmapExtension.ToImage``2(System.Drawing.Bitmap)"]
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
Bitmap. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also