feat: 完成jpeg读取后端

This commit is contained in:
2025-08-15 21:04:50 +08:00
parent 774c9575d4
commit 3644c75304
3 changed files with 236 additions and 31 deletions

View File

@@ -82,6 +82,9 @@ public class Jpeg
readonly string address;
private IPEndPoint ep;
public int Width { get; set; }
public int Height { get; set; }
public Jpeg(string address, int port, int taskID, int timeout = 2000)
{
if (timeout < 0)
@@ -206,6 +209,9 @@ public class Jpeg
var width = data[0] | (data[1] << 8);
var height = data[2] | (data[3] << 8);
this.Width = width;
this.Height = height;
return new((width, height));
}