Home Blog Forum Wiki About Discord
Welcome Guest [Log In] [Register]
Add Reply
P4DTGAConvert by Puggsoy; convert TGA to PNG correctly
Topic Started: Jan 31 2016, 01:34 AM (444 Views)
ShrineFox
Member Avatar
Webmaster
Code:
 
# Persona 4: Dancing All Night .tga
#
# Written by puggsoy
# GFXtract Script (https://github.com/puggsoy/GFXtract/releases)

goto 0x5
get PALLEN short
get BPC short
getdstring DUMMY 3

get WIDTH short
get HEIGHT short
get BPP short
savepos PAL

if BPC == 32
math PALLEN *= 4
setformat BPP BGRA 1 BPC PAL
elif BPC == 24
math PALLEN *= 3
setformat BPP BGR 1 BPC PAL
else
print 'unknown BPC!'
exit
endif

goto PALLEN cur
read IMG WIDTH HEIGHT
flip IMG 1
savepng IMG


Use quickBMS.
Originally from: http://www.vg-resource.com/thread-28615-post-608451.html#pid608451


ALTERNATIVELY, use NOESIS to open the TGAs! It should render them with transparency perfectly in most cases.
If not, use this script.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · P3/4 Tools · Next Topic »
Add Reply