LegioSoft.Imaging.Core
1.0.0
Prefix Reserved
dotnet add package LegioSoft.Imaging.Core --version 1.0.0
NuGet\Install-Package LegioSoft.Imaging.Core -Version 1.0.0
<PackageReference Include="LegioSoft.Imaging.Core" Version="1.0.0" />
<PackageVersion Include="LegioSoft.Imaging.Core" Version="1.0.0" />
<PackageReference Include="LegioSoft.Imaging.Core" />
paket add LegioSoft.Imaging.Core --version 1.0.0
#r "nuget: LegioSoft.Imaging.Core, 1.0.0"
#:package LegioSoft.Imaging.Core@1.0.0
#addin nuget:?package=LegioSoft.Imaging.Core&version=1.0.0
#tool nuget:?package=LegioSoft.Imaging.Core&version=1.0.0
LegioSoft.Imaging.Core
Core interfaces, enums, and base types for LegioSoft.Imaging. Extremely lightweight library containing only shared types.
Installation
dotnet add package LegioSoft.Imaging.Core
Features
- Core Interfaces - ILegioImageEncoder, ILegioImageDecoder, ILegioImageResizer, ILegioImageCropper, ILegioImageTransformer, ILegioImageFilter
- Enums - LegioImageFormat, LegioScaleMode, LegioResizeQuality, LegioEncodingQuality, LegioTransformType, LegioFilterType
- Base Types - LegioImageInfo class for image metadata
Core Types
Classes
FormatDetector- Securely detect image format from byte arrays with validationLegioImageInfo- Image metadata (width, height, format, alpha channel, byte size)
Interfaces
ILegioImageEncoder- Encode images to byte arrays and streamsILegioImageDecoder- Decode images and get metadataILegioImageResizer- Resize images with various modes and quality levelsILegioImageCropper- Crop images to specified regionsILegioImageTransformer- Rotate and flip imagesILegioImageFilter- Apply filters like grayscale, sepia, blur, and sharpen
Enums
LegioImageFormat- PNG, JPEG, WebPLegioScaleMode- Fit, Fill, StretchLegioResizeQuality- Low, Medium, High, MaximumLegioEncodingQuality- Quality levels for encodingLegioTransformType- Rotation transformationsLegioFilterType- Filter types
Usage
Use this package to reference core types without bringing in image processing dependencies:
using LegioSoft.Imaging.Core;
// Detect image format from byte array
var imageData = File.ReadAllBytes("image.jpg");
var format = FormatDetector.DetectFormat(imageData);
Console.WriteLine($"Format: {format}"); // Jpeg
// Get image info (requires implementation package)
var info = new LegioImageInfo
{
Width = 1920,
Height = 1080,
Format = LegioImageFormat.Jpeg,
HasAlpha = false,
ByteSize = 102400
};
// Use enums for settings
var mode = LegioScaleMode.Fit;
var quality = LegioResizeQuality.High;
Format Detection
FormatDetector.DetectFormat() securely identifies image formats:
- Validates input data (null, empty, too short)
- Checks file signatures (magic bytes) for: PNG, JPEG, WebP
- Throws
NotSupportedExceptionfor unknown formats - Throws
ArgumentExceptionfor corrupted/invalid files
Supported formats: PNG, JPEG, WebP
Platform Support
- .NET 6.0, 7.0, 8.0, 9.0, 10.0
- Windows, Linux, macOS (all platforms)
Dependencies
- No external dependencies
- Pure .NET library
License
Apache License 2.0
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- No dependencies.
-
net6.0
- No dependencies.
-
net7.0
- No dependencies.
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on LegioSoft.Imaging.Core:
| Package | Downloads |
|---|---|
|
LegioSoft.Imaging.Skia
Full-featured image processing library built on SkiaSharp. Implements ILegioImageResizer, ILegioImageCropper, ILegioImageTransformer, and ILegioImageFilter interfaces. Provides fluent builder API for easy image manipulation. Supports resize, crop, rotate, flip, and filters (grayscale, sepia, blur, sharpen, brightness, contrast, invert). Format conversion for PNG, JPEG, and WebP. Cross-platform support for Windows, macOS, and Linux. Supports .NET 6.0, 7.0, 8.0, 9.0, and 10.0. |
|
|
LegioSoft.Imaging.WebP
WebP codec wrapper using native libwebp v1.6.0. High-performance WebP encoding and decoding with support for RGBA, RGB, BGRA, BGR formats. Features include lossless/lossy compression, scaling, cropping, flip, and advanced encoding options. Updated for libwebp 1.6.0 with correct ABI version (0x0210) and proper memory management (WebPMemoryWriterClear). Cross-platform support (Windows, Linux, macOS). Implements ILegioImageEncoder and ILegioImageDecoder interfaces from Core package. Use FormatDetector from Core for format detection. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 308 | 1/16/2026 |
| 1.0.0-beta3 | 121 | 1/10/2026 |
| 1.0.0-beta2 | 96 | 1/9/2026 |
| 1.0.0-beta1 | 99 | 1/9/2026 |
Initial release of LegioSoft.Imaging.Core.
Features:
- FormatDetector for secure image format detection with validation
- ILegioImageEncoder and ILegioImageDecoder interfaces for encoding/decoding
- ILegioImageResizer for resize operations
- ILegioImageCropper for crop operations
- ILegioImageTransformer for rotate/flip operations
- ILegioImageFilter for filter operations (grayscale, sepia, blur, sharpen)
- LegioImageFormat enum (PNG, JPEG, WebP, BMP, GIF)
- LegioScaleMode enum (Fit, Fill, Stretch)
- LegioResizeQuality enum (Low, Medium, High, Maximum)
- LegioEncodingQuality enum (0-100 quality levels)
- LegioImageInfo class for image metadata
- Support for .NET 6.0, 7.0, 8.0, 9.0, and 10.0