mirror of
https://github.com/RekuNote/Hatenatools3.git
synced 2026-10-30 16:19:13 +00:00
Made NTFT packing handle padding properly
This commit is contained in:
1 parent
d7475852ae
commit
6e3e92605c
1 file changed
+3
-1
@@ -130,7 +130,7 @@ class NTFT:
|
|||||||
for y in xrange(psize[1]):
|
for y in xrange(psize[1]):
|
||||||
for x in xrange(psize[0]):
|
for x in xrange(psize[0]):
|
||||||
#read
|
#read
|
||||||
c = self.Image[clamp(x, 0, w)][clamp(y, 0, h)]
|
c = self.Image[clamp(x, 0, w-1)][clamp(y, 0, h-1)]
|
||||||
r = c >> 24
|
r = c >> 24
|
||||||
g = (c >> 16) & 0xFF
|
g = (c >> 16) & 0xFF
|
||||||
b = (c >> 8 ) & 0xFF
|
b = (c >> 8 ) & 0xFF
|
||||||
@@ -218,6 +218,8 @@ def ReadImage(path):
|
|||||||
#i.Image = ReadImage("NTFTtests/geh.png")
|
#i.Image = ReadImage("NTFTtests/geh.png")
|
||||||
#i.WriteFile("NTFTtests/geh.ntft")
|
#i.WriteFile("NTFTtests/geh.ntft")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
print " == NTFT.py =="
|
print " == NTFT.py =="
|
||||||
print " == by pbsds =="
|
print " == by pbsds =="
|
||||||
|
|||||||
Reference in new issue
Block a user
