Introduce VirtualStack allocator, refactor memory management to use virtual memory stacks, and update documentation. Added VirtualStack as a new stack allocator using virtual memory, replaced Stack with VirtualStack in allocation manager and related APIs, and updated TempJobAllocator to use VirtualArena. Introduced AllocationManagerInitOpts for allocator configuration. Replaced ENABLE_COLLECTION_CHECKS with ENABLE_SAFETY_CHECKS for safety checks. Removed Result.cs and updated project files and examples. Added comprehensive README files for all major packages and improved root documentation. BREAKING CHANGE: Stack allocator replaced by VirtualStack; TempJobAllocator and AllocationManager initialization signatures changed; Result types removed.
51 lines
1.2 KiB
Markdown
51 lines
1.2 KiB
Markdown
# Misaki.HighPerformance.Image
|
|
|
|
STB-based image loading and translation helpers for C#.
|
|
|
|
This package focuses on practical image decoding with low-level control over memory ownership and result handling.
|
|
|
|
## What it includes
|
|
|
|
- image loading from streams and memory
|
|
- animated GIF frame enumeration
|
|
- image metadata and result wrappers
|
|
- runtime helpers and native memory statistics
|
|
- translation layers for STB image formats
|
|
|
|
## Highlights
|
|
|
|
- allocates image data in unmanaged memory
|
|
- exposes width, height, and component information alongside the pixel buffer
|
|
- useful when you need simple decoding without a heavy graphics dependency
|
|
- supports animated frame workflows in addition to single image loads
|
|
|
|
## Main types
|
|
|
|
- `StbImage`
|
|
- `ImageResult`
|
|
- `ImageInfo`
|
|
- `AnimatedGifEnumerator`
|
|
- `AnimatedFrameResult`
|
|
- `ImageResultFloat`
|
|
- `ColorComponents`
|
|
|
|
## Example
|
|
|
|
```csharp
|
|
using Misaki.HighPerformance.Image;
|
|
using var stream = File.OpenRead("image.png");
|
|
using ImageResult image = ImageResult.FromStream(stream);
|
|
|
|
Span<byte> pixels = image.AsSpan();
|
|
```
|
|
|
|
## Package reference
|
|
|
|
```bash
|
|
dotnet add package Misaki.HighPerformance.Image
|
|
```
|
|
|
|
## Notes
|
|
|
|
This project targets `net10.0` and uses unsafe code for image memory handling.
|