C# Class SquishNET.Squish

Wrapper for libsquish DXT compression/decompression library.
Exibir arquivo Open project: HandsomeMatt/dont-starve-tools

Public Methods

Method Description
Compress ( byte rgba, SquishFlags flags ) : byte[]

Compress a 4x4 pixel block using the parameters specified in flags.

Compress ( IntPtr rgba, IntPtr block, SquishFlags flags ) : void

Compress a 4x4 pixel block using the parameters specified in flags.

CompressImage ( byte rgba, int width, int height, SquishFlags flags ) : byte[]

Compresses an image using the parameters specified in flags.

CompressImage ( IntPtr rgba, int width, int height, IntPtr blocks, SquishFlags flags ) : void

Compresses an image using the parameters specified in flags.

CompressMasked ( byte rgba, int mask, SquishFlags flags ) : byte[]

Compress a 4x4 pixel block using the parameters specified in flags. The mask parameter is a used as a bit mask to specifify what pixels are valid for compression, corresponding the lowest bit to the first pixel.

CompressMasked ( IntPtr rgba, int mask, IntPtr block, SquishFlags flags ) : void

Compress a 4x4 pixel block using the parameters specified in flags. The mask parameter is a used as a bit mask to specifify what pixels are valid for compression, corresponding the lowest bit to the first pixel.

Decompress ( byte block, SquishFlags flags ) : byte[]

Decompresses a 4x4 pixel block using the parameters specified in flags.

Decompress ( IntPtr rgba, IntPtr block, SquishFlags flags ) : void

Decompresses a 4x4 pixel block using the parameters specified in flags.

DecompressImage ( byte blocks, int width, int height, SquishFlags flags ) : byte[]

Decompresses an image using the parameters specified in flags.

DecompressImage ( IntPtr rgba, int width, int height, IntPtr blocks, SquishFlags flags ) : void

Decompresses an image using the parameters specified in flags.

GetStorageRequirements ( int width, int height, SquishFlags flags ) : int

Returns the final size in bytes of DXT data compressed with the parameters specified in flags.

Private Methods

Method Description
Getx64Delegates ( ) : void
Getx86Delegates ( ) : void
Squish ( ) : System

Method Details

Compress() public static method

Compress a 4x4 pixel block using the parameters specified in flags.
public static Compress ( byte rgba, SquishFlags flags ) : byte[]
rgba byte Source RGBA block.
flags SquishFlags Compression flags.
return byte[]

Compress() public static method

Compress a 4x4 pixel block using the parameters specified in flags.
public static Compress ( IntPtr rgba, IntPtr block, SquishFlags flags ) : void
rgba System.IntPtr Source RGBA block.
block System.IntPtr Output DXT compressed block.
flags SquishFlags Compression flags.
return void

CompressImage() public static method

Compresses an image using the parameters specified in flags.
public static CompressImage ( byte rgba, int width, int height, SquishFlags flags ) : byte[]
rgba byte Source RGBA image.
width int Width of the image.
height int Height of the image.
flags SquishFlags Compression flags.
return byte[]

CompressImage() public static method

Compresses an image using the parameters specified in flags.
public static CompressImage ( IntPtr rgba, int width, int height, IntPtr blocks, SquishFlags flags ) : void
rgba System.IntPtr Source RGBA image.
width int Width of the image.
height int Height of the image.
blocks System.IntPtr Output DXT compressed image.
flags SquishFlags Compression flags.
return void

CompressMasked() public static method

Compress a 4x4 pixel block using the parameters specified in flags. The mask parameter is a used as a bit mask to specifify what pixels are valid for compression, corresponding the lowest bit to the first pixel.
public static CompressMasked ( byte rgba, int mask, SquishFlags flags ) : byte[]
rgba byte Source RGBA block.
mask int Pixel bit mask.
flags SquishFlags Compression flags.
return byte[]

CompressMasked() public static method

Compress a 4x4 pixel block using the parameters specified in flags. The mask parameter is a used as a bit mask to specifify what pixels are valid for compression, corresponding the lowest bit to the first pixel.
public static CompressMasked ( IntPtr rgba, int mask, IntPtr block, SquishFlags flags ) : void
rgba System.IntPtr Source RGBA block.
mask int Pixel bit mask.
block System.IntPtr Output DXT compressed block.
flags SquishFlags Compression flags.
return void

Decompress() public static method

Decompresses a 4x4 pixel block using the parameters specified in flags.
public static Decompress ( byte block, SquishFlags flags ) : byte[]
block byte Source DXT block.
flags SquishFlags Decompression flags.
return byte[]

Decompress() public static method

Decompresses a 4x4 pixel block using the parameters specified in flags.
public static Decompress ( IntPtr rgba, IntPtr block, SquishFlags flags ) : void
rgba System.IntPtr Output RGBA decompressed block.
block System.IntPtr Source DXT block.
flags SquishFlags Decompression flags.
return void

DecompressImage() public static method

Decompresses an image using the parameters specified in flags.
public static DecompressImage ( byte blocks, int width, int height, SquishFlags flags ) : byte[]
blocks byte Source DXT compressed image.
width int Width of the image.
height int Height of the image.
flags SquishFlags Decompression flags.
return byte[]

DecompressImage() public static method

Decompresses an image using the parameters specified in flags.
public static DecompressImage ( IntPtr rgba, int width, int height, IntPtr blocks, SquishFlags flags ) : void
rgba System.IntPtr Output RGBA decompressed image.
width int Width of the image.
height int Height of the image.
blocks System.IntPtr Source DXT compressed image.
flags SquishFlags Decompression flags.
return void

GetStorageRequirements() public static method

Returns the final size in bytes of DXT data compressed with the parameters specified in flags.
public static GetStorageRequirements ( int width, int height, SquishFlags flags ) : int
width int Source image width.
height int Source image height.
flags SquishFlags Compression parameters.
return int