mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 08:44:19 -04:00
parent
61a276f49a
commit
00376c9d0a
@ -367,7 +367,7 @@ class Icon:
|
|||||||
# XOR mask
|
# XOR mask
|
||||||
if bpp == 24:
|
if bpp == 24:
|
||||||
# Align rows to 4-byte boundary
|
# Align rows to 4-byte boundary
|
||||||
rowalign = '\0' * (-(size * 3) & 3)
|
rowalign = b'\0' * (-(size * 3) & 3)
|
||||||
for y in xrange(size):
|
for y in xrange(size):
|
||||||
for x in xrange(size):
|
for x in xrange(size):
|
||||||
r, g, b = image.getXel(x, size - y - 1)
|
r, g, b = image.getXel(x, size - y - 1)
|
||||||
@ -503,7 +503,7 @@ class Icon:
|
|||||||
if size > 256:
|
if size > 256:
|
||||||
continue
|
continue
|
||||||
elif size == 256:
|
elif size == 256:
|
||||||
ico.write('\0\0')
|
ico.write(b'\0\0')
|
||||||
else:
|
else:
|
||||||
ico.write(struct.pack('<BB', size, size))
|
ico.write(struct.pack('<BB', size, size))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user