feat: 完成jpeg读取后端
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user