// [Fact] public void PrintWeightsData() { var proc = new ResizeProcessor <Rgba32>(new BicubicResampler(), 200, 200); ResamplingWeightedProcessor <Rgba32> .WeightsBuffer weights = proc.PrecomputeWeights(200, 500); var bld = new StringBuilder(); foreach (ResamplingWeightedProcessor <Rgba32> .WeightsWindow window in weights.Weights) { Span <float> span = window.GetWindowSpan(); for (int i = 0; i < window.Length; i++) { float value = span[i]; bld.Append(value); bld.Append("| "); } bld.AppendLine(); } File.WriteAllText("BicubicWeights.MD", bld.ToString()); // this.Output.WriteLine(bld.ToString()); }
// [Fact] public void PrintWeightsData() { var size = new Size(500, 500); var proc = new ResizeProcessor <Rgba32>(KnownResamplers.Bicubic, 200, 200, size); WeightsBuffer weights = proc.PrecomputeWeights(Configuration.Default.MemoryManager, proc.Width, size.Width); var bld = new StringBuilder(); foreach (WeightsWindow window in weights.Weights) { Span <float> span = window.GetWindowSpan(); for (int i = 0; i < window.Length; i++) { float value = span[i]; bld.Append(value); bld.Append("| "); } bld.AppendLine(); } File.WriteAllText("BicubicWeights.MD", bld.ToString()); // this.Output.WriteLine(bld.ToString()); }