The Forum is up for sale: XeNTaX Forum looking for new owner

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 »

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
Acewell
VIP member
VIP member
Posts: 1330
Joined: Wed Nov 05, 2008 12:16 pm
Has thanked: 2710 times
Been thanked: 883 times

Re: Extracting DDS textures in container with names?

Post by Acewell »

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 »

Many thanks AceWell :)
Post Reply