private void SendFrame(TcpClient client, FrameUpdatedEvent ev) { var stream = client.GetStream(); var encodedFrame = ImageConversion.EncodeArrayToJPG(ev.Data, GraphicsFormat.R8G8B8A8_UNorm, (uint)ev.Resolution, (uint)ev.Resolution, 0, 75); WriteString(GetImageHeaders(encodedFrame), stream); stream.Write(encodedFrame, 0, encodedFrame.Length); WriteString("\r\n", stream); }
private void FrameUpdatedCallback() { ImageAnimator.UpdateFrames(); if (ProcessGifSource != null) { ProcessGifSource.Freeze(); } ProcessGifSource = GetProcessGifSource(); FrameUpdatedEvent?.Invoke(); }
void Update() { FrameUpdatedEvent?.Invoke(this, EventArgs.Empty); }