C# Класс SquishNET.Squish

Wrapper for libsquish DXT compression/decompression library.
Показать файл Открыть проект

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
Getx64Delegates ( ) : void
Getx86Delegates ( ) : void
Squish ( ) : System

Описание методов

Compress() публичный статический Метод

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.
Результат byte[]

Compress() публичный статический Метод

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.
Результат void

CompressImage() публичный статический Метод

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.
Результат byte[]

CompressImage() публичный статический Метод

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.
Результат void

CompressMasked() публичный статический Метод

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.
Результат byte[]

CompressMasked() публичный статический Метод

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.
Результат void

Decompress() публичный статический Метод

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.
Результат byte[]

Decompress() публичный статический Метод

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.
Результат void

DecompressImage() публичный статический Метод

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.
Результат byte[]

DecompressImage() публичный статический Метод

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.
Результат void

GetStorageRequirements() публичный статический Метод

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.
Результат int