CDPTH2TGA(1) | General Commands Manual | CDPTH2TGA(1) |
NAME¶
cdpth2tga
— CDPTH
depth image to TGA converter
SYNOPSIS¶
cdpth2tga |
[options] cdpth 2da tga |
DESCRIPTION¶
cdpth2tga
converts CDPTH depth information
files into common TGA images. CDPTH, Compressed DePTH, are used as depth
information for area background images in BioWare's Nintendo DS game
Sonic
Chronicles: The Dark Brotherhood.
Layout-wise, a CDPTH is stored similar to CBGT: cells of 64×64 pixels, compressed using Nintendo's 0x10 LZSS algorithm. Unlike CBGT, though, the cells themselves are not swizzled into 8×8 tiles, and the pixel value in CDPTH is a 16bit integer specifying a depth.
The width and height of the final image is not stored within the CDPTH file, and has to be provided from the outside, like from the dimensions of the CBGT image, the dimensions of the 2DA file for the CBGT image.
The depth information is stored as 16-bit values, but only the lower 15 bits are used. For conversion into a grayscale image, those 15 bits of grayscale information are further compressed to 8-bit.
OPTIONS¶
- cdpth
- The name of the CDPTH file to read. The CDPTH contains the depth information part of the image.
- 2da
- The name of the 2DA file to use. The 2DA is necessary to know how many cells are in the CDPTH file.
- tga
- The resulting TGA file will be written there.
EXAMPLE¶
Convert a CDPTH+2DA into a TGA:
$ cdpth2tga a.cdpth a.2da
result.tga
SEE ALSO¶
More information about the xoreos project can be found on its website.
AUTHORS¶
This program is part of the xoreos-tools package, which in turn is part of the xoreos project, and was written by the xoreos team. Please see the AUTHORS file for details.
July 23, 2015 | Debian |