Class ProcessedImage
An image that has gone through the scanning (or importing) process. It has metadata about the image, possibly additional post-processing data from the scan, and may have transformations that have been applied during or after the scan.
This type is immutable and uses a reference counting model for the underlying image storage. You can create a new reference with Clone() that will need to be disposed, and the underlying image storage will only be disposed once all related instances are disposed (or the parent ScanningContext is disposed).
public class ProcessedImage : IRenderableImage, IDisposable, IEquatable<ProcessedImage>
- Inheritance
-
ProcessedImage
- Implements
- Inherited Members
Properties
ImageContext
public ImageContext ImageContext { get; }
Property Value
Metadata
public ImageMetadata Metadata { get; }
Property Value
PostProcessingData
public PostProcessingData PostProcessingData { get; }
Property Value
Storage
public IImageStorage Storage { get; }
Property Value
TransformState
public TransformState TransformState { get; }
Property Value
Methods
Clone()
Creates a new ProcessedImage instance with the same underlying image storage/metadata. All instances will need to be disposed before the underlying image storage is disposed.
public ProcessedImage Clone()
Returns
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Equals(ProcessedImage?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(ProcessedImage? other)
Parameters
other
ProcessedImageAn object to compare with this object.
Returns
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
obj
objectThe object to compare with the current object.
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
GetWeakReference()
Creates a WeakReference wrapper for the current instance that doesn't have any effect on the instance's lifetime.
public ProcessedImage.WeakReference GetWeakReference()
Returns
WithNoTransforms(bool)
Creates a new ProcessedImage instance with the same underlying image storage/metadata and no transforms. All instances will need to be disposed before the underlying image storage is disposed.
public ProcessedImage WithNoTransforms(bool disposeSelf = false)
Parameters
disposeSelf
bool
Returns
WithPostProcessingData(PostProcessingData, bool)
public ProcessedImage WithPostProcessingData(PostProcessingData postProcessingData, bool disposeSelf)
Parameters
postProcessingData
PostProcessingDatadisposeSelf
bool
Returns
WithTransform(Transform, bool)
Creates a new ProcessedImage instance with the same underlying image storage/metadata and a new transform appended to the TransformState. All instances will need to be disposed before the underlying image storage is disposed.
public ProcessedImage WithTransform(Transform transform, bool disposeSelf = false)
Parameters
Returns
WithTransformState(TransformState, bool)
Creates a new ProcessedImage instance with the same underlying image storage/metadata and a new transform state. All instances will need to be disposed before the underlying image storage is disposed.
public ProcessedImage WithTransformState(TransformState newTransformState, bool disposeSelf = false)
Parameters
newTransformState
TransformStatedisposeSelf
bool