BCLIM (File Format)

From Wexos's Wiki
(Redirected from BCLIM)
Jump to navigationJump to search

The BCLIM file format (Binary Citra Layout IMage) is used to store layout images on the Nintendo 3DS.

File Format

Header

The header is at the end of the file (to align the image data without the need for additional padding). It is always 0x14 bytes.

Offset Type Description
0x00 Char[4] File magic. Always CLIM in ASCII.
0x04 UInt16 Byte-order-mark. FE FF for big endian, FF FE for little endian.
0x06 UInt16 Header size, always 0x14.
0x08 UInt32 Version of this file.
0x0C UInt32 File size in bytes.
0x10 UInt16 Number of data blocks, always 0x01.
0x12 UInt16 Padding.

Image Information

A section containing image information comes directly after header. It is always 0x14 bytes long.

Offset Type Description
0x00 Char[4] Section magic. Always imag in ASCII.
0x04 UInt32 Parse information size.
0x08 UInt16 Width of the texture in pixels.
0x0A UInt16 Height of the texture in pixels.
0x0C UInt32 Image format. See here for an explanation of all formats.

Format

ID Name Type Bits Per Pixel (BPP)
0x00 L8 Luminance 8
0x01 A8 Alpha 8
0x02 LA4 Luminance + Alpha 8
0x03 LA8 Luminance + Alpha 16
0x04 HILO8 ? 16
0x05 RGB565 Color 16
0x06 RGB8 Color 32
0x07 RGB5A1 Color + Alpha 16
0x08 RGBA4 Color + Alpha 16
0x09 RGBA8 Color + Alpha 32
0x0A ETC1 Color 4
0x0B ETC1A4 Color + Alpha 8
0x0C L4 Luminance 4
0x0D A4 Alpha 4

Tools

The following tools can handle BCLIM files: