Skip to content

Instantly share code, notes, and snippets.

View TIny-Hacker's full-sized avatar
🤔
Trying to understand my own code

TIny_Hacker TIny-Hacker

🤔
Trying to understand my own code
View GitHub Profile
@huytrinhm
huytrinhm / convert.py
Created December 18, 2024 03:41
Convert Halfbrick Jetpack Joyride texture files (*.tex) to png
import os
import glob
import struct
from PIL import Image
def check_file_header(file_path):
headers = [
b'\x54\x45\x58\x01\x00\x00\x00\x01\x04\x02\x04\x03\x04\x04\x04\x01\x00\x00\x00\x00',
b'\x54\x45\x58\x01\x06\x00\x00\x00\x08\x02\x08\x03\x08\x04\x08\x01\x00\x00\x00\x00',
b'\x54\x45\x58\x01\x00\x00\x00\x03\x08\x01\x08\x04\x08\x03\x08\x02\x00\x00\x00\x00',