Skip to content
Discussion options

You must be logged in to vote

Yes, the Vector4 path is expected. ImageSharp processes TPixel through a common floating-point representation so the same convolution implementation works across pixel formats and retains precision during the calculations. It also handles alpha correctly for formats that have it.

Your control is specialized for L8, a fixed three-pixel kernel, and opaque grayscale data. It can avoid the pixel conversions and general processing work, so it is reasonable for that narrower implementation to be faster. Matching output for these inputs does not remove the need for the generic path.

There is no configuration switch that selects an L8-only box blur. Your conversion profile is useful evidence of a…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by JimBobSquarePants
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants