Created
January 6, 2021 16:54
-
-
Save krypton-byte/2fe124d9acfb6c418948ea1b2113d877 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # create: Krypton-byte | |
| # Python Version | |
| def stickerExif(stickerPackID, packname, author, googlelink, applelink): | |
| code = [0x00,0x00,0x16,0x00,0x00,0x00] | |
| exif = {"sticker-pack-id": stickerPackID,"sticker-pack-name": packname,"sticker-pack-publisher": author,"android-app-store-link": googlelink,"ios-app-store-link": applelink} | |
| if (length:=exif.__str__().__len__()) > 256: | |
| length -=256 | |
| code.insert(0, 0x01) | |
| else: | |
| code.insert(0, 0x00) | |
| return bytes([0x49, 0x49, 0x2A, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x41, 0x57, 0x07, 0x00])+bytes([int("0x0"+hex(length)[2:].__str__() if length < 16 else hex(length)[2:].__str__(), 16)])+bytes(code)+exif.__str__().encode() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment