Attempt a typed linear access on the plane's pixels.
Namespace: Stemmer.Cvb
Assembly: Stemmer.Cvb (in Stemmer.Cvb.dll) Version: 14.0.0.0
Syntax
public bool TryGetLinearAccess<T>( out LinearAccessData<T> access ) where T : struct, new()
Parameters
- access
- Type: Stemmer.CvbLinearAccessDataT
Data structure receiving the values for accessing the pixels
Type Parameters
- T
- Structure for access a single plane's pixel.
Return Value
Type: Booleantrue if linear access is possible, false otherwise.
Exceptions
Exception | Condition |
---|---|
ObjectDisposedException | If Parent has already been disposed |
InvalidOperationException | Thrown if the size of T and BytesPerPixel are unequal. |
Remarks
This function scans the image's VPAT for the possibility to access the individual pixels with linear increments in x and y direction. If either of the VPATs are jumbled, it will return false, otherwise the values in access can be used to calculate the address of each pixel.
Additionally the size of T must be equal to the BytesPerPixel.
Attention: Do not use reference types in T as this will leak memory!
See Also