Class MemoryAllocatorExtensions
Extension methods for MemoryAllocator.
Inherited Members
Namespace: SixLabors.ImageSharp.Memory
Assembly: SixLabors.ImageSharp.dll
Syntax
public static class MemoryAllocatorExtensionsMethods
| Improve this Doc View SourceAllocate2D<T>(MemoryAllocator, Size, AllocationOptions)
Allocates a buffer of value type objects interpreted as a 2D region
of size width x size height elements.
Declaration
public static Buffer2D<T> Allocate2D<T>(this MemoryAllocator memoryAllocator, Size size, AllocationOptions options = AllocationOptions.None)
    where T : structParameters
| Type | Name | Description | 
|---|---|---|
| MemoryAllocator | memoryAllocator | The memory allocator. | 
| Size | size | The buffer size. | 
| AllocationOptions | options | The allocation options. | 
Returns
| Type | Description | 
|---|---|
| Buffer2D<T> | The Buffer2D<T>. | 
Type Parameters
| Name | Description | 
|---|---|
| T | The type of buffer items to allocate. | 
Allocate2D<T>(MemoryAllocator, Size, Boolean, AllocationOptions)
Allocates a buffer of value type objects interpreted as a 2D region
of size width x size height elements.
Declaration
public static Buffer2D<T> Allocate2D<T>(this MemoryAllocator memoryAllocator, Size size, bool preferContiguosImageBuffers, AllocationOptions options = AllocationOptions.None)
    where T : structParameters
| Type | Name | Description | 
|---|---|---|
| MemoryAllocator | memoryAllocator | The memory allocator. | 
| Size | size | The buffer size. | 
| Boolean | preferContiguosImageBuffers | A value indicating whether the allocated buffer should be contiguous, unless bigger than MaxValue. | 
| AllocationOptions | options | The allocation options. | 
Returns
| Type | Description | 
|---|---|
| Buffer2D<T> | The Buffer2D<T>. | 
Type Parameters
| Name | Description | 
|---|---|
| T | The type of buffer items to allocate. | 
Allocate2D<T>(MemoryAllocator, Int32, Int32, AllocationOptions)
Allocates a buffer of value type objects interpreted as a 2D region
of width x height elements.
Declaration
public static Buffer2D<T> Allocate2D<T>(this MemoryAllocator memoryAllocator, int width, int height, AllocationOptions options = AllocationOptions.None)
    where T : structParameters
| Type | Name | Description | 
|---|---|---|
| MemoryAllocator | memoryAllocator | The memory allocator. | 
| Int32 | width | The buffer width. | 
| Int32 | height | The buffer height. | 
| AllocationOptions | options | The allocation options. | 
Returns
| Type | Description | 
|---|---|
| Buffer2D<T> | The Buffer2D<T>. | 
Type Parameters
| Name | Description | 
|---|---|
| T | The type of buffer items to allocate. | 
Allocate2D<T>(MemoryAllocator, Int32, Int32, Boolean, AllocationOptions)
Allocates a buffer of value type objects interpreted as a 2D region
of width x height elements.
Declaration
public static Buffer2D<T> Allocate2D<T>(this MemoryAllocator memoryAllocator, int width, int height, bool preferContiguosImageBuffers, AllocationOptions options = AllocationOptions.None)
    where T : structParameters
| Type | Name | Description | 
|---|---|---|
| MemoryAllocator | memoryAllocator | The memory allocator. | 
| Int32 | width | The buffer width. | 
| Int32 | height | The buffer height. | 
| Boolean | preferContiguosImageBuffers | A value indicating whether the allocated buffer should be contiguous, unless bigger than MaxValue. | 
| AllocationOptions | options | The allocation options. | 
Returns
| Type | Description | 
|---|---|
| Buffer2D<T> | The Buffer2D<T>. | 
Type Parameters
| Name | Description | 
|---|---|
| T | The type of buffer items to allocate. |