Merge pull request #984 from selliott512/fix-gfx-offsets-signed-int

scripts: Signed ints for grAb in fix-gfx-offsets
This commit is contained in:
Simon Howard 2023-06-24 02:17:01 -04:00 committed by GitHub
commit 6a50fb2eef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -20,7 +20,7 @@ class Graphic(object):
reader = png.Reader(file=open(self.filepath, "rb"))
for chunk in reader.chunks():
if chunk[0] == "grAb":
self.xoffset, self.yoffset = struct.unpack(">II", chunk[1])
self.xoffset, self.yoffset = struct.unpack(">ii", chunk[1])
self.has_offset = True