Castle Game Engine: CastleImages: Class TGPUCompressedImage

# Class TGPUCompressedImage
Description | Hierarchy | Fields | Methods | Properties
## Unit CastleImages ## Declaration `type TGPUCompressedImage = class(TEncodedImage)` ## Description Image compressed using one of the GPU texture compression algorithms. ## Hierarchy TObject TEncodedImage TGPUCompressedImage ## Overview ### Methods
| `constructor Create(const AWidth, AHeight, ADepth: Cardinal; const ACompression: TGPUCompression);`
| `function Size: Cardinal; override;`
| `function HasAlpha: boolean; override;`
| `function AlphaChannel( const AlphaTolerance: Byte): TAlphaChannel; override;`
| `procedure FlipVertical;`
| `function Decompress: TCastleImage;`
| `function MakeCopy: TGPUCompressedImage;`
### Properties
| `property Compression: TGPUCompression read FCompression;`
## Description ### Methods
| `constructor Create(const AWidth, AHeight, ADepth: Cardinal; const ACompression: TGPUCompression);`
| `function Size: Cardinal; override;`
Size of the whole image data inside RawPixels, in bytes.
| `function HasAlpha: boolean; override;`
| `function AlphaChannel( const AlphaTolerance: Byte): TAlphaChannel; override;`
| `procedure FlipVertical;`
Flip compressed image vertically, losslessly. This works only for (some) S3TC images. It uses the knowledge of how S3TC compression works 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 ECannotFlipCompressedImage Raised 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 the image. This uses DecompressTexture variable, so you have to initialialize it first (for example to CastleGLImages.GLDecompressTexture) before using this. ###### Exceptions raised ECannotDecompressTexture If we cannot decompress the texture, because decompressor is not set or there was some other error within decompressor.
| `function MakeCopy: TGPUCompressedImage;`
### Properties
| `property Compression: TGPUCompression read FCompression;`
Generated by PasDoc 0.13.0 on 2015-06-15 04:43:10