Skip to content

Pass additional arguments to the PixelAccessor delegate to allow external span access. #1904

Discussion options

You must be logged in to vote

I think we should keep ProcessPixelRows concepts simple, it's an API for direct pixel access outside of processor code.

We should better expose ImageFrame<T>.PixelBuffer:

internal Buffer2D<TPixel> PixelBuffer { get; private set; }

so ImageSharp.Drawing can go with Buffer2D<T>.DangerousGetRowSpan(y), just like most core library processors after my refactor:
https://github.com/SixLabors/ImageSharp/search?q=dangerousgetrowspan

image.Frames.RootFrame.PixelBuffer is hidden enough from beginners, I actually thought it's already public API!

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@JimBobSquarePants
Comment options

Answer selected by JimBobSquarePants
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
2 participants