Update to go1.24.0

This commit is contained in:
Vorapol Rinsatitnon
2025-02-14 12:42:07 +07:00
parent 25e497e367
commit bf266cebe6
3169 changed files with 236789 additions and 60275 deletions

View File

@@ -146,8 +146,8 @@ func (e *encoder) writeHeader() {
}
// Logical screen width and height.
byteorder.LePutUint16(e.buf[0:2], uint16(e.g.Config.Width))
byteorder.LePutUint16(e.buf[2:4], uint16(e.g.Config.Height))
byteorder.LEPutUint16(e.buf[0:2], uint16(e.g.Config.Width))
byteorder.LEPutUint16(e.buf[2:4], uint16(e.g.Config.Height))
e.write(e.buf[:4])
if p, ok := e.g.Config.ColorModel.(color.Palette); ok && len(p) > 0 {
@@ -185,7 +185,7 @@ func (e *encoder) writeHeader() {
}
e.buf[0] = 0x03 // Block Size.
e.buf[1] = 0x01 // Sub-block Index.
byteorder.LePutUint16(e.buf[2:4], uint16(e.g.LoopCount))
byteorder.LEPutUint16(e.buf[2:4], uint16(e.g.LoopCount))
e.buf[4] = 0x00 // Block Terminator.
e.write(e.buf[:5])
}
@@ -271,7 +271,7 @@ func (e *encoder) writeImageBlock(pm *image.Paletted, delay int, disposal byte)
} else {
e.buf[3] = 0x00 | disposal<<2
}
byteorder.LePutUint16(e.buf[4:6], uint16(delay)) // Delay Time (1/100ths of a second)
byteorder.LEPutUint16(e.buf[4:6], uint16(delay)) // Delay Time (1/100ths of a second)
// Transparent color index.
if transparentIndex != -1 {
@@ -283,10 +283,10 @@ func (e *encoder) writeImageBlock(pm *image.Paletted, delay int, disposal byte)
e.write(e.buf[:8])
}
e.buf[0] = sImageDescriptor
byteorder.LePutUint16(e.buf[1:3], uint16(b.Min.X))
byteorder.LePutUint16(e.buf[3:5], uint16(b.Min.Y))
byteorder.LePutUint16(e.buf[5:7], uint16(b.Dx()))
byteorder.LePutUint16(e.buf[7:9], uint16(b.Dy()))
byteorder.LEPutUint16(e.buf[1:3], uint16(b.Min.X))
byteorder.LEPutUint16(e.buf[3:5], uint16(b.Min.Y))
byteorder.LEPutUint16(e.buf[5:7], uint16(b.Dx()))
byteorder.LEPutUint16(e.buf[7:9], uint16(b.Dy()))
e.write(e.buf[:9])
// To determine whether or not this frame's palette is the same as the