Fix transmission by file

This commit is contained in:
Kovid Goyal
2025-10-09 09:35:06 +05:30
parent c6582e9f51
commit 2ac2c17929
2 changed files with 6 additions and 4 deletions

View File

@@ -62,6 +62,10 @@ type SerializableImageFrame struct {
Size int
}
func (s SerializableImageFrame) NeededSize() int {
return utils.IfElse(s.Is_opaque, 3, 4) * s.Width * s.Height
}
func (s *ImageFrame) Serialize() SerializableImageFrame {
return SerializableImageFrame{
Width: s.Width, Height: s.Height, Left: s.Left, Top: s.Top,