#0016 优化集成图像库

This commit is contained in:
zhengxuan.zhang
2026-03-14 20:39:34 +08:00
parent 47e163f774
commit 1214da13d2
17 changed files with 293 additions and 67 deletions
@@ -11,6 +11,7 @@ namespace XplorePlane.Services
{
IReadOnlyList<string> GetAvailableProcessors();
IReadOnlyList<ProcessorParameter> GetProcessorParameters(string processorName);
ImageProcessorBase GetProcessor(string processorName);
void RegisterProcessor(string name, ImageProcessorBase processor);
Task<BitmapSource> ProcessImageAsync(
@@ -71,6 +71,13 @@ namespace XplorePlane.Services
throw new ArgumentException($"Processor not registered: {processorName}", nameof(processorName));
}
public ImageProcessorBase GetProcessor(string processorName)
{
if (_processorRegistry.TryGetValue(processorName, out var processor))
return processor;
throw new ArgumentException($"Processor not registered or is 16-bit only: {processorName}", nameof(processorName));
}
public async Task<BitmapSource> ProcessImageAsync(
BitmapSource source,
string processorName,