Class ProcessingPipeline
Represents an image processing pipeline from which computed pixels can be retrieved.
Inheritance
Implements
Namespace: PhotoSauce.MagicScaler
Assembly: PhotoSauce.MagicScaler.dll
Syntax
public sealed class ProcessingPipeline : Object
Properties
PixelSource
The source for retrieving calculated pixels from the pipeline.
Declaration
public IPixelSource PixelSource { get; }
Property Value
| Type | Description |
|---|---|
| IPixelSource |
Settings
The settings used to construct the pipeline. Any default or auto properties will reflect their final calculated values.
Declaration
public ProcessImageSettings Settings { get; }
Property Value
| Type | Description |
|---|---|
| ProcessImageSettings |
Stats
Basic instrumentation for the operation. There will be one PixelSourceStats instance for each pipeline step.
Declaration
public IEnumerable<PixelSourceStats> Stats { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<PixelSourceStats> |
Remarks
This collection will be empty unless the PhotoSauce.MagicScaler.EnablePixelSourceStats System.AppContext switch is set to true.
Methods
AddTransform(IPixelTransform)
Adds a new transform filter to the pipeline. Because a filter may alter dimensions or pixel format of an image, filters may not be added once the PixelSource has been retrieved.
Declaration
public ProcessingPipeline AddTransform(IPixelTransform transform)
Parameters
| Type | Name | Description |
|---|---|---|
| IPixelTransform | transform | The IPixelTransform that implements the filter. |
Returns
| Type | Description |
|---|---|
| ProcessingPipeline |
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
WriteOutput(Stream)
Completes processing of the pipeline, writing the output image to outStream.
Declaration
public ProcessImageResult WriteOutput(Stream outStream)
Parameters
| Type | Name | Description |
|---|---|---|
| System.IO.Stream | outStream | The stream to which the output image will be written. The stream must allow Seek and Write. |
Returns
| Type | Description |
|---|---|
| ProcessImageResult | A ProcessImageResult containing the settings used and basic instrumentation for the pipeline. |