public V2ImageFrame(IColorFrame frame) { _frame = frame; _description = frame.get_FrameDescription(); Time = frame.get_RelativeTime(); _buffer = _frame.AccessRawUnderlyingBuffer(out _bufferSize); }
public V2DepthFrame(IDepthFrame frame) { _frame = frame; _initialized = true; _description = frame.get_FrameDescription(); Time = frame.get_RelativeTime(); _buffer = _frame.AccessUnderlyingBuffer(out _bufferSize); }
void SetFrame(IColorFrame frame) { _frame = frame; _time = frame.get_RelativeTime(); UInt32 capacity; _buffer = _frame.AccessRawUnderlyingBuffer(out capacity); _description = frame.get_FrameDescription(); _bytesPerPixel=(Int32)_description.get_BytesPerPixel(); _width=_description.get_Width(); _height=_description.get_Height(); }
void SetFrame(IColorFrame frame) { _frame = frame; _time = frame.get_RelativeTime(); UInt32 capacity; _buffer = _frame.AccessRawUnderlyingBuffer(out capacity); _description = frame.get_FrameDescription(); _bytesPerPixel = (Int32)_description.get_BytesPerPixel(); _width = _description.get_Width(); _height = _description.get_Height(); }
protected override void OnDispose() { if (_description != null) { Marshal.ReleaseComObject(_description); _description = null; } if (_frame != null) { Marshal.ReleaseComObject(_frame); _frame = null; } if (_reference != null) { Marshal.ReleaseComObject(_reference); _reference = null; } if (_data != null) { Marshal.ReleaseComObject(_data); _data = null; } }