thrownewImageProcessingException($"An error occurred when processing the image using {this.GetType().Name}. The processor changed the number of frames.");
// we now need to move the pixel data/size data from one image base to another
if(cloned.Frames.Count!=source.Frames.Count)
if(cloned.Frames.Count!=this.Source.Frames.Count)
{
thrownewImageProcessingException($"An error occurred when processing the image using {this.GetType().Name}. The processor changed the number of frames.");
}
source.SwapOrCopyPixelsBuffersFrom(cloned);
this.Source.SwapOrCopyPixelsBuffersFrom(cloned);
}
}
/// <inheritdoc/>
publicvoidDispose()
{
this.Dispose(true);
}
/// <summary>
/// Generates a deep clone of the source image that operations should be applied to.
/// </summary>
/// <param name="source">The source image. Cannot be null.</param>
/// <param name="clipHistogram">Indicating whether to clip the histogram bins at a specific value.</param>
/// <param name="clipLimitPercentage">Histogram clip limit in percent of the total pixels in the tile. Histogram bins which exceed this limit, will be capped at this value.</param>
/// <param name="tiles">The number of tiles the image is split into (horizontal and vertically). Minimum value is 2. Maximum value is 100.</param>
/// <param name="clipHistogram">Indicating whether to clip the histogram bins at a specific value.</param>
/// <param name="clipLimitPercentage">Histogram clip limit in percent of the total pixels in the tile. Histogram bins which exceed this limit, will be capped at this value.</param>
/// <param name="tiles">The number of tiles the image is split into (horizontal and vertically). Minimum value is 2. Maximum value is 100.</param>
/// <param name="clipHistogram">Indicating whether to clip the histogram bins at a specific value.</param>
/// <param name="clipLimitPercentage">Histogram clip limit in percent of the total pixels. Histogram bins which exceed this limit, will be capped at this value.</param>
/// <param name="clipHistogram">Indicates, if histogram bins should be clipped.</param>
/// <param name="clipLimitPercentage">Histogram clip limit in percent of the total pixels in the tile. Histogram bins which exceed this limit, will be capped at this value.</param>