-
Notifications
You must be signed in to change notification settings - Fork 71
/
PS_PAL.ahk
312 lines (308 loc) · 46.7 KB
/
PS_PAL.ahk
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
;
; AutoHotkey Version: 1.1.30.00
; Language: English
; Platform: Optimized for Windows 10
; Author: Sam.
;
;;;;; Reference Documents ;;;;;
; http://www.fileformat.info/format/bmp/egff.htm
; http://www.tactilemedia.com/info/MCI_Control_Info.html
; http://www.johnloomis.org/cpe102/asgn/asgn1/riff.html
; http://www.adobe.com/devnet-apps/photoshop/fileformatashtml/#50577411_pgfId-1070626
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;; PS_PAL v0.0.01a ;;;;;
;;;;; Copyright (c) 2018 Sam. ;;;;;
;;;;; Last Updated 20180925 ;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
class PSPAL{
ImportPaletteFromPalObj(PalObj){
If IsObject(PalObj)
{
Clone:=ObjFullyClone(PalObj)
While (Clone.MinIndex()>0)
Clone.RemoveAt(Clone.MinIndex()-1,1)
Return (this.Palette:=Clone)
}
}
ImportPaletteFromFile(InputFile){
file:=FileOpen(InputFile,"r-d")
file.RawRead(Palette,Len:=file.Length)
file.Close()
Return this.ImportPaletteFromMem(&Palette,Len)
}
ImportPaletteFromMem(Address,Bytes){
PalObj:={}
Palette:=New MemoryFileIO(Address,Bytes)
Palette.Seek(0,0)
Format2:=Palette.Read(2)
Format3:=Palette.Read(1)
Format4:=Palette.Read(1)
If (Format2="BM") ; Bitmap
{
Palette.Seek(10,0)
BitmapOffset:=Palette.ReadUInt()
Size:=Palette.ReadUInt()
PaletteLength:=(BitmapOffset-Size-14)
PaletteElementCount:=(Size=12?3:4)
Palette.Seek(Size+14,"0") ; Jump to palette
If PaletteLength ; If there is a palette
{
Loop, % PaletteLength//PaletteElementCount
{
Index:=A_Index-1
PalObj[Index,"BB"]:=Palette.ReadUChar()
PalObj[Index,"GG"]:=Palette.ReadUChar()
PalObj[Index,"RR"]:=Palette.ReadUChar()
If (PaletteElementCount=3)
PalObj[Index,"AA"]:=0
Else
PalObj[Index,"AA"]:=Palette.ReadUChar()
}
}
Else
Console.Send("Attempted to read palette from BMP file with no palette. A blank palette object will be returned.`r`n","W")
}
Else If (Format2 Format3="GIF")
{
LGIF:=new PSGIF()
LGIF.LoadGIFFromMemory(Address,Bytes)
PalObj:=LGIF.GetPaletteObject("Global",1)
If !(PalObj.Length())
PalObj:=LGIF.GetPaletteObject("Local",1)
LGIF:=""
}
Else If (Format2 Format3 Format4="RIFF")
{
Palette.Seek(0,0) ; FileSize = (ChunkSize+4)
ChunkType:=Palette.Read(4) ; ChunkType = "RIFF"
ChunkSize:=Palette.ReadDWORD() ; ChunkSize = (SubChunkSize+12)
FormType:=Palette.Read(4) ; FormType = "PAL "
SubChunkID:=Palette.Read(4) ; SubChunkID = "data"
SubChunkSize:=Palette.ReadDWORD() ; SubChunkSize = (palNumEntries*4+4)
palVersion:=Palette.ReadWORD() ; palVersion = 768?
palNumEntries:=Palette.WriteWORD() ; palNumEntries
If (ChunkType="RIFF") AND (FormType="PAL ") AND (SubChunkID="data") ; Is a valid Windows PAL Palette
{
Loop, % palNumEntries
{
Index:=A_Index-1
PalObj[Index,"RR"]:=Palette.ReadUChar()
PalObj[Index,"GG"]:=Palette.ReadUChar()
PalObj[Index,"BB"]:=Palette.ReadUChar()
PalObj[Index,"AA"]:=Palette.ReadUChar()
}
}
Else
Console.Send("Attempted to read palette from Windows PAL Palette file but file format was not recognized. A blank palette object will be returned.`r`n","W")
}
Else If (Bytes=768) OR (Bytes=772) ; Looks like an Adobe ACT Palette
{
Palette.Seek(0,0)
Loop, % (Bytes=768?Bytes//3:(Bytes-4)//3)
{
Index:=A_Index-1
PalObj[Index,"RR"]:=Palette.ReadUChar()
PalObj[Index,"GG"]:=Palette.ReadUChar()
PalObj[Index,"BB"]:=Palette.ReadUChar()
}
}
Else ; Default to Raw/Bin
{
Palette.Seek(0,0)
Loop, % (Bytes//4)
{
Index:=A_Index-1
PalObj[Index,"RR"]:=Palette.ReadUChar()
PalObj[Index,"GG"]:=Palette.ReadUChar()
PalObj[Index,"BB"]:=Palette.ReadUChar()
PalObj[Index,"AA"]:=Palette.ReadUChar()
}
}
Palette:=""
Return (this.Palette:=PalObj)
}
TransformTransparency(From:="",To:=255){
If (From="")
{
If IsObject(this.Palette)
For k,v in this.Palette
v["AA"]:=(To=-1?v["AA"]^255:To)
}
Else
{
If IsObject(this.Palette)
For k,v in this.Palette
If (v["AA"]=From)
v["AA"]:=(To=-1?v["AA"]^255:To)
}
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;; Warning: This function assumes your colors are 8-bit and number no more than 256!! ;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
ExportPalette(PalObj,Type,OutPath,CountOfPaletteEntries:="",TransColorIndex:=0){
;tic:=QPC(1)
If !IsObject(PalObj)
PalObj:=this.Palette
If !CountOfPaletteEntries
CountOfPaletteEntries:=PalObj.Length()+1
If (Type="BMPV") OR (Type="ALL") ; http://www.fileformat.info/format/bmp/egff.htm
{
TD:=""
Static 1 = "Qk02aAAAAAAAADYEAAAoAAAAQAEAAFAAAAABAAgAAAAAAABkAAAAAAAAAAAAAAABAAAAAQAAAAAAAAEBAQACAgIAAwMDAAQEBAAFBQUABgYGAAcHBwAICAgACQkJAAoKCgALCwsADAwMAA0NDQAODg4ADw8PABAQEAAREREAEhISABMTEwAUFBQAFRUVABYWFgAXFxcAGBgYABkZGQAaGhoAGxsbABwcHAAdHR0AHh4eAB8fHwAgICAAISEhACIiIgAjIyMAJCQkACUlJQAmJiYAJycnACgoKAApKSkAKioqACsrKwAsLCwALS0tAC4uLgAvLy8AMDAwADExMQAyMjIAMzMzADQ0NAA1NTUANjY2ADc3NwA4ODgAOTk5ADo6OgA7OzsAPDw8AD09PQA+Pj4APz8/AEBAQABBQUEAQkJCAENDQwBEREQARUVFAEZGRgBHR0cASEhIAElJSQBKSkoAS0tLAExMTABNTU0ATk5OAE9PTwBQUFAAUVFRAFJSUgBTU1MAVFRUAFVVVQBWVlYAV1dXAFhYWABZWVkAWlpaAFtbWwBcXFwAXV1dAF5eXgBfX18AYGBgAGFhYQBiYmIAY2NjAGRkZABlZWUAZmZmAGdnZwBoaGgAaWlpAGpqagBra2sAbGxsAG1tbQBubm4Ab29vAHBwcABxcXEAcnJyAHNzcwB0dHQAdXV1AHZ2dgB3d3cAeHh4AHl5eQB6enoAe3t7AHx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ozs7S0tLS0tLS0tLS1tbW1tbW1tbW1tra2tra2tra2tre3t7e3t7e3t7e4uLi4uLi4uLi4ubm5ubm5ubm5ubq6urq6urq6urq7u7u7u7u7u7u7vLy8vLy8vLy8vL29vb29vb29vb2+vr6+vr6+vr6+v7+/v7+/v7+/v6CgoKCgoKCgoKChoaGhoaGhoaGhoqKioqKioqKioqOjo6Ojo6Ojo6OkpKSkpKSkpKSkpaWlpaWlpaWlpaampqampqampqanp6enp6enp6enqKioqKioqKioqKmpqampqampqamqqqqqqqqqqqqqq6urq6urq6urq6ysrKysrKysrKytra2tra2tra2trq6urq6urq6urq+vr6+vr6+vr6+wsLCwsLCwsLCwsbGxsbGxsbGxsbKysrKysrKysrKzs7Ozs7Ozs7OztLS0tLS0tLS0tLW1tbW1tbW1tbW2tra2tra2tra2t7e3t7e3t7e3t7i4uLi4uLi4uLi5ubm5ubm5ubm5urq6urq6urq6uru7u7u7u7u7u7u8vLy8vLy8vLy8vb29vb29vb29vb6+vr6+vr6+vr6/v7+/v7+/v7+/oKCgoKCgoKCgoKGhoaGhoaGhoaGioqKioqKioqKio6Ojo6Ojo6Ojo6SkpKSkpKSkpKSlpaWlpaWlpaWlpqampqampqampqenp6enp6enp6eoqKioqKioqKioqampqampqampqaqqqqqqqqqqqqqrq6urq6urq6urrKysrKysrKysrK2tra2tra2tra2urq6urq6urq6ur6+vr6+vr6+vr7CwsLCwsLCwsLCxsbGxsbGxsbGxsrKysrKysrKysrOzs7Ozs7Ozs7O0tLS0tLS0tLS0tbW1tbW1tbW1tba2tra2tra2tra3t7e3t7e3t7e3uLi4uLi4uLi4uLm5ubm5ubm5ubm6urq6urq6urq6u7u7u7u7u7u7u7y8vLy8vLy8vLy9vb29vb29vb29vr6+vr6+vr6+vr+/v7+/v7+/v7+goKCgoKCgoKCgoaGhoaGhoaGhoaKioqKioqKioqKjo6Ojo6Ojo6OjpKSkpKSkpKSkpKWlpaWlpaWlpaWmpqampqampqamp6enp6enp6enp6ioqKioqKioqKipqampqampqampqqqqqqqqqqqqqqurq6urq6urq6usrKysrKysrKysra2tra2tra2tra6urq6urq6urq6vr6+vr6+vr6+vsLCwsLCwsLCwsLGxsbGxsbGxsbGysrKysrKysrKys7Ozs7Ozs7Ozs7S0tLS0tLS0tLS1tbW1tbW1tbW1tra2tra2tra2tre3t7e3t7e3t7e4uLi4uLi4uLi4ubm5ubm5ubm5ubq6urq6urq6urq7u7u7u7u7u7u7vLy8vLy8vLy8vL29vb29vb29vb2+vr6+vr6+vr6+v7+/v7+/v7+/v6CgoKCgoKCgoKChoaGhoaGhoaGhoqKioqKioqKioqOjo6Ojo6Ojo6OkpKSkpKSkpKSkpaWlpaWlpaWlpaampqampqampqanp6enp6enp6enqKioqKioqKioqKmpqampqampqamqqqqqqqqqqqqqq6urq6urq6urq6ysrKysrKysrKytra2tra2tra2trq6urq6urq6urq+vr6+vr6+vr6+wsLCwsLCwsLCwsbGxsbGxsbGxsbKysrKysrKysrKzs7Ozs7Ozs7OztLS0tLS0tLS0tLW1tbW1tbW1tbW2tra2tra2tra2t7e3t7e3t7e3t7i4uLi4uLi4uLi5ubm5ubm5ubm5urq6urq6urq6uru7u7u7u7u7u7u8vLy8vLy8vLy8vb29vb29vb29vb6+vr6+vr6+vr6/v7+/v7+/v7+/oKCgoKCgoKCgoKGhoaGhoaGhoaGioqKioqKioqKio6Ojo6Ojo6Ojo6SkpKSkpKSkpKSlpaWlpaWlpaWlpqampqampqampqenp6enp6enp6eoqKioqKioqKioqampqampqampqaqqqqqqqqqqqqqrq6urq6urq6urrKysrKysrKysrK2tra2tra2tra2urq6urq6urq6ur6+vr6+vr6+vr7CwsLCwsLCwsLCxsbGxsbGxsbGxsrKysrKysrKysrOzs7Ozs7Ozs7O0tLS0tLS0tLS0tbW1tbW1tbW1tba2tra2tra2tra3t7e3t7e3t7e3uLi4uLi4uLi4uLm5ubm5ubm5ubm6urq6urq6urq6u7u7u7u7u7u7u7y8vLy8vLy8vLy9vb29vb29vb29vr6+vr6+vr6+vr+/v7+/v7+/v7+goKCgoKCgoKCgoaGhoaGhoaGhoaKioqKioqKioqKjo6Ojo6Ojo6OjpKSkpKSkpKSkpKWlpaWlpaWlpaWmpqampqampqamp6enp6enp6enp6ioqKioqKioqKipqampqampqampqqqqqqqqqqqqqqurq6urq6urq6usrKysrKysrKysra2tra2tra2tra6urq6urq6urq6vr6+vr6+vr6+vsLCwsLCwsLCwsLGxsbGxsbGxsbGysrKysrKysrKys7Ozs7Ozs7Ozs7S0tLS0tLS0tLS1tbW1tbW1tbW1tra2tra2tra2tre3t7e3t7e3t7e4uLi4uLi4uLi4ubm5ubm5ubm5ubq6urq6urq6urq7u7u7u7u7u7u7vLy8vLy8vLy8vL29vb29vb29vb2+vr6+vr6+vr6+v7+/v7+/v7+/v6CgoKCgoKCgoKChoaGhoaGhoaGhoqKioqKioqKioqOjo6Ojo6Ojo6OkpKSkpKSkpKSkpaWlpaWlpaWlpaampqampqampqanp6enp6enp6enqKioqKioqKioqKmpqampqampqamqqqqqqqqqqqqqq6urq6urq6urq6ysrKysrKysrKytra2tra2tra2trq6urq6urq6urq+vr6+vr6+vr6+wsLCwsLCwsLCwsbGxsbGxsbGxsbKysrKysrKysrKzs7Ozs7Ozs7OztLS0tLS0tLS0tLW1tbW1tbW1tbW2tra2tra2tra2t7e3t7e3t7e3t7i4uLi4uLi4uLi5ubm5ubm5ubm5urq6urq6urq6uru7u7u7u7u7u7u8vLy8vLy8vLy8vb29vb29vb29vb6+vr6+vr6+vr6/v7+/v7+/v7+/oKCgoKCgoKCgoKGhoaGhoaGhoaGioqKioqKioqKio6Ojo6Ojo6Ojo6SkpKSkpKSkpKSlpaWlpaWlpaWlpqampqampqampqenp6enp6enp6eoqKioqKioqKioqampqampqampqaqqqqqqqqqqqqqrq6urq6urq6urrKysrKysrKysrK2tra2tra2tra2urq6urq6urq6ur6+vr6+vr6+vr7CwsLCwsLCwsLCxsbGxsbGxsbGxsrKysrKysrKysrOzs7Ozs7Ozs7O0tLS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wcHBwcHBwcHCAgICAgICAgICAkJCQkJCQkJCQkKCgoKCgoKCgoKCwsLCwsLCwsLCwwMDAwMDAwMDAwNDQ0NDQ0NDQ0NDg4ODg4ODg4ODg8PDw8PDw8PDw8QEBAQEBAQEBAQERERERERERERERISEhISEhISEhITExMTExMTExMTFBQUFBQUFBQUFBUVFRUVFRUVFRUWFhYWFhYWFhYWFxcXFxcXFxcXFxgYGBgYGBgYGBgZGRkZGRkZGRkZGhoaGhoaGhoaGhsbGxsbGxsbGxscHBwcHBwcHBwcHR0dHR0dHR0dHR4eHh4eHh4eHh4fHx8fHx8fHx8fAAAAAAAAAAAAAAEBAQEBAQEBAQECAgICAgICAgICAwMDAwMDAwMDAwQEBAQEBAQEBAQFBQUFBQUFBQUFBgYGBgYGBgYGBgcHBwcHBwcHBwcICAgICAgICAgICQkJCQkJCQkJCQoKCgoKCgoKCgoLCwsLCwsLCwsLDAwMDAwMDAwMDA0NDQ0NDQ0NDQ0ODg4ODg4ODg4ODw8PDw8PDw8PDxAQEBAQEBAQEBAREREREREREREREhISEhISEhISEhMTExMTExMTExMUFBQUFBQUFBQUFRUVFRUVFRUVFRYWFhYWFhYWFhYXFxcXFxcXFxcXGBgYGBgYGBgYGBkZGRkZGRkZGRkaGhoaGhoaGhoaGxsbGxsbGxsbGxwcHBwcHBwcHBwdHR0dHR0dHR0dHh4eHh4eHh4eHh8fHx8fHx8fHx8="
Loop, 3
TD.=%A_Index%
VarSetCapacity(Out_Data,Bytes:=26678,0)
ErrorLevel:=DllCall("Crypt32.dll\CryptStringToBinary","Ptr",&TD,"UInt",0,"UInt",1,"Ptr",&Out_Data,"UIntP",Bytes,"Int",0,"Int",0,"CDECL Int")
If !(ErrorLevel)
throw { what: (IsFunc(A_ThisFunc)?"function: " A_ThisFunc "()":"") A_Tab (IsLabel(A_ThisLabel)?"label: " A_ThisLabel:""), file: A_LineFile, line: A_LineNumber, message: "ErrorLevel=" ErrorLevel A_Tab "A_LastError=" A_LastError, extra: "CryptStringToBinary Error"}
TD:=""
Palette:=New MemoryFileIO(Out_Data,Bytes)
Palette.Seek(54,0)
Loop, % CountOfPaletteEntries
{
Index:=A_Index-1
Palette.WriteUChar(PalObj[Index,"BB"])
Palette.WriteUChar(PalObj[Index,"GG"])
Palette.WriteUChar(PalObj[Index,"RR"])
Palette.WriteUChar(PalObj[Index,"AA"])
}
Offset:=Palette.Tell()
While Offset<1078
Palette.WriteUChar(0), Offset++
file:=FileOpen(OutPath "_Palette.bmp","w-d")
file.RawWrite(Out_Data,Bytes)
file.Close()
Palette:=""
;this.GetPaletteStats(OutPath,OutPath "_Palette.bmp")
}
If (Type="BMP") OR (Type="ALL") ; http://www.fileformat.info/format/bmp/egff.htm
{
TD:="Qk06BAAAAAAAADYEAAAoAAAAAQAAAAEAAAABAAgAAAAAAAQAAAAAAAAAAAAAAAABAAAAAQAAAAAAAAEBAQACAgIAAwMDAAQEBAAFBQUABgYGAAcHBwAICAgACQkJAAoKCgALCwsADAwMAA0NDQAODg4ADw8PABAQEAAREREAEhISABMTEwAUFBQAFRUVABYWFgAXFxcAGBgYABkZGQAaGhoAGxsbABwcHAAdHR0AHh4eAB8fHwAgICAAISEhACIiIgAjIyMAJCQkACUlJQAmJiYAJycnACgoKAApKSkAKioqACsrKwAsLCwALS0tAC4uLgAvLy8AMDAwADExMQAyMjIAMzMzADQ0NAA1NTUANjY2ADc3NwA4ODgAOTk5ADo6OgA7OzsAPDw8AD09PQA+Pj4APz8/AEBAQABBQUEAQkJCAENDQwBEREQARUVFAEZGRgBHR0cASEhIAElJSQBKSkoAS0tLAExMTABNTU0ATk5OAE9PTwBQUFAAUVFRAFJSUgBTU1MAVFRUAFVVVQBWVlYAV1dXAFhYWABZWVkAWlpaAFtbWwBcXFwAXV1dAF5eXgBfX18AYGBgAGFhYQBiYmIAY2NjAGRkZABlZWUAZmZmAGdnZwBoaGgAaWlpAGpqagBra2sAbGxsAG1tbQBubm4Ab29vAHBwcABxcXEAcnJyAHNzcwB0dHQAdXV1AHZ2dgB3d3cAeHh4AHl5eQB6enoAe3t7AHx8fAB9fX0Afn5+AH9/fwCAgIAAgYGBAIKCggCDg4MAhISEAIWFhQCGhoYAh4eHAIiIiACJiYkAioqKAIuLiwCMjIwAjY2NAI6OjgCPj48AkJCQAJGRkQCSkpIAk5OTAJSUlACVlZUAlpaWAJeXlwCYmJgAmZmZAJqamgCbm5sAnJycAJ2dnQCenp4An5+fAKCgoAChoaEAoqKiAKOjowCkpKQApaWlAKampgCnp6cAqKioAKmpqQCqqqoAq6urAKysrACtra0Arq6uAK+vrwCwsLAAsbGxALKysgCzs7MAtLS0ALW1tQC2trYAt7e3ALi4uAC5ubkAurq6ALu7uwC8vLwAvb29AL6+vgC/v78AwMDAAMHBwQDCwsIAw8PDAMTExADFxcUAxsbGAMfHxwDIyMgAycnJAMrKygDLy8sAzMzMAM3NzQDOzs4Az8/PANDQ0ADR0dEA0tLSANPT0wDU1NQA1dXVANbW1gDX19cA2NjYANnZ2QDa2toA29vbANzc3ADd3d0A3t7eAN/f3wDg4OAA4eHhAOLi4gDj4+MA5OTkAOXl5QDm5uYA5+fnAOjo6ADp6ekA6urqAOvr6wDs7OwA7e3tAO7u7gDv7+8A8PDwAPHx8QDy8vIA8/PzAPT09AD19fUA9vb2APf39wD4+PgA+fn5APr6+gD7+/sA/Pz8AP39/QD+/v4A////AAAAAAA="
VarSetCapacity(Out_Data,Bytes:=1082,0)
ErrorLevel:=DllCall("Crypt32.dll\CryptStringToBinary","Ptr",&TD,"UInt",0,"UInt",1,"Ptr",&Out_Data,"UIntP",Bytes,"Int",0,"Int",0,"CDECL Int")
If !(ErrorLevel)
throw { what: (IsFunc(A_ThisFunc)?"function: " A_ThisFunc "()":"") A_Tab (IsLabel(A_ThisLabel)?"label: " A_ThisLabel:""), file: A_LineFile, line: A_LineNumber, message: "ErrorLevel=" ErrorLevel A_Tab "A_LastError=" A_LastError, extra: "CryptStringToBinary Error"}
TD:=""
Palette:=New MemoryFileIO(Out_Data,Bytes)
Palette.Seek(54,0)
Loop, % CountOfPaletteEntries
{
Index:=A_Index-1
Palette.WriteUChar(PalObj[Index,"BB"])
Palette.WriteUChar(PalObj[Index,"GG"])
Palette.WriteUChar(PalObj[Index,"RR"])
Palette.WriteUChar(PalObj[Index,"AA"])
}
Offset:=Palette.Tell()
While Offset<1078
Palette.WriteUChar(0), Offset++
file:=FileOpen(OutPath "_Palette" (Type="ALL"?"2":"") ".bmp","w-d")
file.RawWrite(Out_Data,Bytes)
file.Close()
Palette:=""
}
If (Type="Raw") OR (Type="Bin") OR (Type="ALL")
{
VarSetCapacity(Out_Data,Bytes:=(CountOfPaletteEntries)*4,0)
Palette:=New MemoryFileIO(Out_Data,Bytes)
Palette.Seek(0,0)
Loop, % CountOfPaletteEntries
{
Index:=A_Index-1
Palette.WriteUChar(PalObj[Index,"RR"])
Palette.WriteUChar(PalObj[Index,"GG"])
Palette.WriteUChar(PalObj[Index,"BB"])
Palette.WriteUChar(PalObj[Index,"AA"])
}
file:=FileOpen(OutPath "_Palette.bin","w-d")
file.RawWrite(Out_Data,Bytes)
file.Close()
Palette:=""
}
If (Type="PAL") OR (Type="ALL") ; http://www.tactilemedia.com/info/MCI_Control_Info.html | http://www.johnloomis.org/cpe102/asgn/asgn1/riff.html
{
palNumEntries:=CountOfPaletteEntries, SubChunkSize:=(palNumEntries*4+4), ChunkSize:=(SubChunkSize+12), FileSize:=Bytes:=(ChunkSize+8)
VarSetCapacity(Out_Data,Bytes,0)
Palette:=New MemoryFileIO(Out_Data,Bytes)
Palette.Seek(0,0) ; FileSize = (ChunkSize+8)
Palette.Write("RIFF",4) ; ChunkType = "RIFF"
Palette.WriteDWORD(ChunkSize) ; ChunkSize = (SubChunkSize+12)
Palette.Write("PAL ",4) ; FormType = "PAL "
Palette.Write("data",4) ; SubChunkID = "data"
Palette.WriteDWORD(SubChunkSize) ; SubChunkSize = (palNumEntries*4+4)
Palette.WriteWORD(768) ; palVersion = 768?
Palette.WriteWORD(palNumEntries) ; palNumEntries
Loop, % CountOfPaletteEntries
{
Index:=A_Index-1
Palette.WriteUChar(PalObj[Index,"RR"])
Palette.WriteUChar(PalObj[Index,"GG"])
Palette.WriteUChar(PalObj[Index,"BB"])
Palette.WriteUChar(PalObj[Index,"AA"])
}
file:=FileOpen(OutPath "_Palette.pal","w-d")
file.RawWrite(Out_Data,Bytes)
file.Close()
Palette:=""
}
If (Type="ACT") OR (Type="ALL") ; http://www.adobe.com/devnet-apps/photoshop/fileformatashtml/#50577411_pgfId-1070626
{
VarSetCapacity(Out_Data,Bytes:=772,0) ; Or Bytes=768 if we skip the last two words (CountOfPaletteEntries & TransColorIndex)
Palette:=New MemoryFileIO(Out_Data,Bytes)
Palette.Seek(0,0)
Loop, % CountOfPaletteEntries
{
Index:=A_Index-1
Palette.WriteUChar(PalObj[Index,"RR"])
Palette.WriteUChar(PalObj[Index,"GG"])
Palette.WriteUChar(PalObj[Index,"BB"])
}
Palette.WriteWORD(CountOfPaletteEntries)
Palette.WriteWORD(TransColorIndex)
file:=FileOpen(OutPath "_Palette.act","w-d")
file.RawWrite(Out_Data,Bytes)
file.Close()
Palette:=""
}
;Console.Send("Palette exported in " Type " format in " (QPC(1)-tic) " sec.`r`n","-I")
}
GetPaletteRaw(PalObj,Address,Size,ColorFormat:="BGRA",BitsPerChannel:=8,CountOfPaletteEntries:=256){
If !IsObject(PalObj)
PalObj:=this.Palette
Bytes:={8: "UChar", 16: "UShort", 32: "UInt", 64: "Int64"}
NumBytes:=(Bytes[BitsPerChannel]=""?"UChar":Bytes[BitsPerChannel])
Fmt:={}
Fmt[InStr(ColorFormat,"R")]:="RR", Fmt[InStr(ColorFormat,"G")]:="GG", Fmt[InStr(ColorFormat,"B")]:="BB", Fmt[InStr(ColorFormat,"A")]:="AA"
hPal:=New MemoryFileIO(Address,Size)
hPal.Seek(0,0)
Loop, % PalObj.Length()
{
If Fmt.HasKey(1)
hPal["Write" NumBytes](PalObj[A_Index,Fmt[1]])
If Fmt.HasKey(2)
hPal["Write" NumBytes](PalObj[A_Index,Fmt[2]])
If Fmt.HasKey(3)
hPal["Write" NumBytes](PalObj[A_Index,Fmt[3]])
If Fmt.HasKey(4)
hPal["Write" NumBytes](PalObj[A_Index,Fmt[4]])
If (A_Index=CountOfPaletteEntries)
Break
}
hPal:=""
}
GetPaletteObj(){
Return ObjFullyClone(this.Palette)
}
}
/*
ObjFullyClone(obj){ ; https://autohotkey.com/board/topic/103411-cloned-object-modifying-original-instantiation/?p=638500
nobj:=ObjClone(obj)
For k,v in nobj
If IsObject(v)
nobj[k]:=ObjFullyClone(v)
Return nobj
}
*/