-
Notifications
You must be signed in to change notification settings - Fork 0
/
genlogo.py
45 lines (32 loc) · 1013 Bytes
/
genlogo.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import io
offset0 = 0x4000
offset1 = 0x5000
offset2 = 0x2B000
offset3 = 0x1C1000
offset4 = 0x1EF000
offset5 = 0x7DE000
outpt = open("logo_new.img", "wb")
emptyContent = [0 for i in range(0xDCCFFF)]
magic = [0x4C, 0x4F, 0x47, 0x4F, 0x21, 0x21, 0x21, 0x21, 0x05, 0x00, 0x00, 0x00,
0x2B, 0x00, 0x00, 0x00, 0xC1, 0x01, 0x00, 0x00, 0xEF, 0x01, 0x00, 0x00,
0xDE, 0x07, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x96, 0x01, 0x00, 0x00,
0x2E, 0x00, 0x00, 0x00, 0xEF, 0x05, 0x00, 0x00, 0xEF, 0x05, 0x00, 0x00]
outpt.write(bytearray(emptyContent))
outpt.seek(offset0)
outpt.write(bytearray(magic))
outpt.seek(offset1)
img = open("01.bmp", "rb")
outpt.write(img.read())
outpt.seek(offset2)
img = open("02.bmp", "rb")
outpt.write(img.read())
outpt.seek(offset3)
img = open("03.bmp", "rb")
outpt.write(img.read())
outpt.seek(offset4)
img = open("04.bmp", "rb")
outpt.write(img.read())
outpt.seek(offset5)
img = open("05.bmp", "rb")
outpt.write(img.read())
outpt.close()