Skip to content

How to create a custom Pixel Format? #2274

Answered by antonfirsov
Jacbo1 asked this question in Q&A
Discussion options

You must be logged in to vote

new PixelOperations() required

The PixelOperations<T> type is not abstract, and the constructor is public, you should be able to instantiate a new PixelOperations<R8>(). Subclassing is needed to optimize conversion operations: you can create your own R8PixelOperations : PixelOperations<R8> subclass and override methods with optimized ones.

PixelTypeInfo.Create<R8>() (or maybe PixelTypeInfo itself)

You can use one of the public constructors to instantiate a PixelTypeInfo. Create<TPixel> is really just a thin wrapper around them.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Jacbo1
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