-
-
Notifications
You must be signed in to change notification settings - Fork 851
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* OilPaint benchmark * fix #2518 * Update OilPaintingProcessor{TPixel}.cs * clamp the vector to 0..1 and undo buffer overallocation * throw ImageProcessingException instead of clamping --------- Co-authored-by: James Jackson-South <james_south@hotmail.com>
- Loading branch information
1 parent
9335a16
commit 54b7e04
Showing
3 changed files
with
55 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright (c) Six Labors. | ||
// Licensed under the Six Labors Split License. | ||
|
||
using BenchmarkDotNet.Attributes; | ||
using SixLabors.ImageSharp.PixelFormats; | ||
using SixLabors.ImageSharp.Processing; | ||
|
||
namespace SixLabors.ImageSharp.Benchmarks.Processing; | ||
|
||
[Config(typeof(Config.MultiFramework))] | ||
public class OilPaint | ||
{ | ||
[Benchmark] | ||
public void DoOilPaint() | ||
{ | ||
using Image<RgbaVector> image = new Image<RgbaVector>(1920, 1200, new(127, 191, 255)); | ||
image.Mutate(ctx => ctx.OilPaint()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters