Extracting DDS textures in container with names?

Get your graphics formats figures out here! Got details for others? Post here!
Post Reply
User avatar
blackracer
advanced
Posts: 51
Joined: Sat Jun 27, 2015 1:20 pm
Has thanked: 30 times
Been thanked: 49 times

Extracting DDS textures in container with names?

Post by blackracer » Tue Feb 07, 2017 7:42 pm

Hello guys, please help me to extract DDS textures with names in this container.

Names and DDS Header:
Start DDS in file
Image
End DDS in file
Image
But I do not know how to find the end of DDS and wrote file names with script
This container files can contain up to 100 textures

Sample files:
It contains one texture: https://www.dropbox.com/s/1b6yhnt3oqp6c ... G.img?dl=0
It contains three texture: https://www.dropbox.com/s/weaazytqmijne ... R.img?dl=0

User avatar
Acewell
VIP member
VIP member
Posts: 1329
Joined: Wed Nov 05, 2008 12:16 pm
Has thanked: 2683 times
Been thanked: 841 times

Re: Extracting DDS textures in container with names?

Post by Acewell » Sat Feb 11, 2017 2:25 am

here is bms script to split dds from your samples with names :D

Code: Select all

idstring "IMGE"
findloc OFFSET binary "\x44\x44\x53\x20"
do
    math OFFSET - 4
    goto OFFSET
    get SIZE long
    savepos OFFSET
    xmath nameloc "SIZE + OFFSET + 7"
    goto nameloc
    get NAME string
    log NAME OFFSET SIZE
    findloc OFFSET binary "\x44\x44\x53\x20" 0 ""
while OFFSET != ""

User avatar
blackracer
advanced
Posts: 51
Joined: Sat Jun 27, 2015 1:20 pm
Has thanked: 30 times
Been thanked: 49 times

Re: Extracting DDS textures in container with names?

Post by blackracer » Mon Feb 13, 2017 11:31 pm

Many thanks AceWell :)

Post Reply