Castle Game Engine: CastleImages: Class TS3TCImage

# Class TS3TCImage
Description | Hierarchy | Fields | Methods | Properties
## Unit CastleImages ## Declaration `type TS3TCImage = class(TEncodedImage)` ## Description Image encoded with S3TC compression. ## Hierarchy TObject TEncodedImage TS3TCImage ## Overview ### Methods
| `constructor Create(const AWidth, AHeight: Cardinal; const ADepth: Cardinal; const ACompression: TS3TCCompression);`
| `function HasAlpha: boolean; override;`
| `function AlphaChannel( const AlphaTolerance: Byte; const WrongPixelsTolerance: Single): TAlphaChannel; override;`
| `procedure FlipVertical;`
| `function Decompress: TCastleImage;`
| `function MakeCopy: TS3TCImage;`
### Properties
| `property Compression: TS3TCCompression read FCompression;`
| `property Size: Cardinal read FSize;`
## Description ### Methods
| `constructor Create(const AWidth, AHeight: Cardinal; const ADepth: Cardinal; const ACompression: TS3TCCompression);`
| `function HasAlpha: boolean; override;`
| `function AlphaChannel( const AlphaTolerance: Byte; const WrongPixelsTolerance: Single): TAlphaChannel; override;`
| `procedure FlipVertical;`
Flip compressed image vertically, losslessly. This usese the knowledge of how S3TC compression works, how the data is coded for each 4x4 block, to losslessly flip the image, without re-compressing it. The idea is described here [http://users.telenet.be/tfautre/softdev/ddsload/explanation.htm]. ###### Exceptions raised ECannotFlipS3TCImage Raises ECannotFlipS3TCImage when image Height is not 1, 2, 3 or a multiple of 4 (since the trick doesn't work in these cases, pixels would move between 4x4 blocks). Note that if Height is a power of two (as common for OpenGL textures) then it's always possible to make a flip.
| `function Decompress: TCastleImage;`
Decompress S3TC image. This uses DecompressS3TC variable, so you have to initialialize it first (for example to GLImage.GLDecompressS3TC) before using this. ###### Exceptions raised ECannotDecompressS3TC If cannot decompress S3TC, because decompressor is not set and there was some other error within decompressor.
| `function MakeCopy: TS3TCImage;`
### Properties
| `property Compression: TS3TCCompression read FCompression;`
| `property Size: Cardinal read FSize;`
Size of the whole image data inside RawPixels, in bytes.
Generated by PasDoc 0.13.0 on 2013-08-17 21:27:12