internal void UpdateBitmap(PixelBuffer colorBuffer, PixelBuffer alphaBuffer) { if (colorBuffer != null && this.colorDiff != null) { byte[] actualColorDiff = MifRunLengthEncoding.Decode(this.colorDiff, 2); foreach (var change in MifDeltaEncoding.GetChanges(actualColorDiff, true)) { colorBuffer.Write(change.StartIndex, change.NewData, change.NewDataOffset, change.Length); } } if (alphaBuffer != null && this.alphaDiff != null) { byte[] actualAlphaDiff = MifRunLengthEncoding.Decode(this.alphaDiff, 1); foreach (var change in MifDeltaEncoding.GetChanges(actualAlphaDiff, true)) { alphaBuffer.Write(change.StartIndex, change.NewData, change.NewDataOffset, change.Length); } } }
public int delay = 0; // delay in milliseconds #endregion Fields #region Methods public void UpdateBitmap(PixelBuffer colorBuffer, PixelBuffer alphaBuffer) { if (colorBuffer != null && colorData != null) { colorBuffer.Write(0, colorData, 0, colorData.Length); } if (alphaBuffer != null && alphaData != null) { alphaBuffer.Write(0, alphaData, 0, alphaData.Length); } }