Click or drag to resize

AtalaImageFromBitmap 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.4.0.9.0.377 (.NET 4.5.2, x86)
Syntax
public static AtalaImage FromBitmap(
	Bitmap bitmap,
	bool atalaImageWillOwnBitmap
)

Parameters

bitmap
Type: System.DrawingBitmap
The source Bitmap to convert
atalaImageWillOwnBitmap
Type: SystemBoolean
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