public byte[] GetBlockArray() { DFFrameBlock block = GetBlock(); byte[] temp = block.ToArray(); block.Free(); return temp; }
public void SetBlock(DFFrameBlock block) { if (IsFull) { throw new ArgumentOutOfRangeException(); } int x = _blockPos % _width; int y = _blockPos / _width; Mat ROI = _mat.SubMat(new Rect(x, y, 8, 8)); block.Body.CopyTo(ROI); BlockPointerInc(); }
public void SetBlock(DFFrameBlock block) { foreach(DFFrameSub sub in _frames) { if(sub.IsFull) { continue; } sub.SetBlock(block); return; } throw new IndexOutOfRangeException(); }
public DFFrameBlock GetBlock() { if (IsFull) { throw new ArgumentOutOfRangeException(); } int x = _blockPos % _width; int y = _blockPos / _width; Mat ROI = _mat.SubMat(new Rect(x, y, 8, 8)); DFFrameBlock block = new DFFrameBlock(); ROI.CopyTo(block.Body); BlockPointerInc(); return(block); }
public void SetBlockArray(byte[] array) { DFFrameBlock block = new DFFrameBlock(array); SetBlock(block); block.Free(); }