ArrayPoolingStrategy Enumeration

Represents the possible values for the BitmapDataFactory.PoolingStrategy property, which specifies the array pooling strategies for the self-allocating CreateBitmapData overloads in the BitmapDataFactory class.

Definition

Namespace: KGySoft.Drawing.Imaging
Assembly: KGySoft.Drawing.Core (in KGySoft.Drawing.Core.dll) Version: 10.0.0-rc.1
C#
public enum ArrayPoolingStrategy

Members

Never0 Indicates that no array pooling occurs when creating IBitmapData instances by the self-allocating factory methods. This strategy will always use the best matching element type for the underlying buffer.
IfByteArrayBased1 Specifies that array pooling occurs only if the natural buffer element type of the created IBitmapData instance is byte anyway. This is the case for indexed pixel formats in the KnownPixelFormat enumaration.
IfCanUseByteArray2 Specifies that array pooling always occurs if the created IBitmapData instance can use a byte array as its buffer. This is true for all pixel formats as long as the size of the underlying buffer does not exceed the maximum size of a byte array. Please note that the default array pool may not cache large arrays, and that accessing the reinterpreted elements may be slightly slower than using the best matching element type.
AnyElementType3 Uses array pooling (if available on the current platform) for any element type. This may consume more memory than the other strategies, but there is no performance penalty for reinterpreting the elements.

See Also