ICogImage8PixelMemory InterfaceCognex VisionPro 9.22
Interface to an object that provides direct pointer access to 8-bit image pixel memory.

Namespace: Cognex.VisionPro
Assembly: Cognex.VisionPro.Core (in Cognex.VisionPro.Core.dll) Version: 87.0.0.0
Syntax

public interface ICogImage8PixelMemory : IDisposable

The ICogImage8PixelMemory type exposes the following members.

Methods

  NameDescription
Public methodDispose
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
(Inherited from IDisposable.)
Top
Properties

  NameDescription
Public propertyHeight
Returns the height of the pixel data.
Public propertyScan0
Returns the address of the upper-left pixel.
Public propertyStride
Returns the offset in pixels from one row to the next. May be positive or negative.
Public propertyWidth
Returns the width of the pixel data.
Top
Remarks

Interface to an object that provides direct pointer access to 8-bit image pixel memory. Use Get8GreyPixelMemory(CogImageDataModeConstants, Int32, Int32, Int32, Int32) to get an CogImage8PixelMemory object.

CogImage8PixelMemory objects are intended for temporary use within functions that read or write pixel data. Caching an CogImage8PixelMemory object for long periods of time could lead to memory congestion. You must call Dispose  when you are finished using the object to release any resources that it uses. After you do so, any pointer that Scan0 returned becomes invalid.

If you request read/write or write-only access to the pixel memory when you call Get8GreyPixelMemory(CogImageDataModeConstants, Int32, Int32, Int32, Int32), the pixel memory may be copied internally. Any changes that you make to the pixel may not be written back to the image until you call Dispose . Your application should assume that no changes to the image take place until then.

See Also