Click or drag to resize

AtalaImage.FromBitmap Method (Bitmap, Boolean)

Converts a specified Bitmap into an AtalaImage by taking ownership of the Bitmap data, or returning a copy of the Bitmap data.

Namespace:  Atalasoft.Imaging
Assembly:  Atalasoft.dotImage (in Atalasoft.dotImage.dll) Version: 11.5.0.0.0.156 (.NET 4.6.2, x86)
Syntax
public static AtalaImage FromBitmap(
	Bitmap bitmap,
	bool atalaImageWillOwnBitmap
)

Parameters

bitmap
Type: System.Drawing.Bitmap
The source Bitmap to convert
atalaImageWillOwnBitmap
Type: System.Boolean
When true, the Bitmap data will be owned by the AtalaImage.

Return Value

Type: AtalaImage
A copy of a GDI+ System.Drawing.Bitmap object in the form of an AtalaImage object.
Remarks

When setting atalaImageWillOwnBitmap to true, do not Dispose the Bitmap. The AtalaImage object holds onto a reference to the Bitmap object, so the garbage collector will not free the Bitmap data until the host AtalaImage goes out of scope or is disposed.

When atalaImageWillOwnBitmap is false, a copy is returned and it's up to the caller to dispose the Bitmap.

See Also