Class TRGBFloatImage
Unit
Declaration
type TRGBFloatImage = class(TCastleImage)
Description
Image with high-precision RGB colors encoded as 3 floating-point Single values.
Source: src/images/castleimages_class_rgb_float.inc (line 19).
Hierarchy
- TObject
- TEncodedImage
- TCastleImage
- TRGBFloatImage
Overview
Methods
![]() |
function GetColors(const X, Y, Z: Integer): TCastleColor; override; |
![]() |
procedure SetColors(const X, Y, Z: Integer; const C: TCastleColor); override; |
![]() |
class function PixelSize: Cardinal; override; |
![]() |
class function ColorComponentsCount: Cardinal; override; |
![]() |
function PixelPtr(const X, Y: Cardinal; const Z: Cardinal = 0): PVector3; |
![]() |
function RowPtr(const Y: Cardinal; const Z: Cardinal = 0): PVector3Array; |
![]() |
procedure InvertColors; override; |
![]() |
procedure Clear(const Pixel: TVector4Byte); overload; override; |
![]() |
function IsClear(const Pixel: TVector4Byte): boolean; overload; override; |
![]() |
procedure Clear(const Pixel: TVector3); reintroduce; overload; |
![]() |
function IsClear(const Pixel: TVector3): boolean; reintroduce; overload; |
![]() |
function ToRGBImage: TRGBImage; deprecated 'create TRGBImage and use TRGBImage.Assign'; |
![]() |
function ToFpImage: TInternalCastleFpImage; override; |
![]() |
procedure ScaleColors(const Scale: Single); |
![]() |
procedure ExpColors(const Exp: Single); |
![]() |
procedure LerpWith(const Value: Single; SecondImage: TCastleImage); override; |
![]() |
class procedure MixColors(const OutputColor: Pointer; const Weights: TVector4; const AColors: TVector4Pointer); override; |
![]() |
procedure Assign(const Source: TCastleImage); override; |
Properties
![]() |
property Pixels: PVector3 read GetPixels; |
![]() |
property RGBFloatPixels: PVector3 read GetPixels; deprecated 'use Pixels'; |
![]() |
property PixelsArray: PVector3Array read GetPixelsArray; |
Description
Methods
![]() |
function GetColors(const X, Y, Z: Integer): TCastleColor; override; |
|
This item has no description. Source: src/images/castleimages_class_rgb_float.inc (line 27). | |
![]() |
procedure SetColors(const X, Y, Z: Integer; const C: TCastleColor); override; |
|
This item has no description. Source: src/images/castleimages_class_rgb_float.inc (line 28). | |
![]() |
class function PixelSize: Cardinal; override; |
|
This item has no description. Showing description inherited from TCastleImage.PixelSize. Size of TPixel in bytes for this TCastleImage descendant. Source: src/images/castleimages_class_rgb_float.inc (line 36). | |
![]() |
class function ColorComponentsCount: Cardinal; override; |
|
This item has no description. Showing description inherited from TCastleImage.ColorComponentsCount. Number of color components in TPixel. E.g. RGB is 3 components and RGB+Alpha is 4 components, RGB+Exponent is 3 components (because it describes only Red, Green and Blue values (Exponent value is just used to correctly interpret these, it's not a 4th component)). Source: src/images/castleimages_class_rgb_float.inc (line 37). | |
![]() |
function PixelPtr(const X, Y: Cardinal; const Z: Cardinal = 0): PVector3; |
|
This item has no description. Source: src/images/castleimages_class_rgb_float.inc (line 39). | |
![]() |
function RowPtr(const Y: Cardinal; const Z: Cardinal = 0): PVector3Array; |
|
This item has no description. Source: src/images/castleimages_class_rgb_float.inc (line 40). | |
![]() |
procedure InvertColors; override; |
|
This item has no description. Showing description inherited from TCastleImage.InvertColors. Inverts all colors (RGB or grayscale, but doesn't touch alpha channel). "Inverting" means changing color C in range [0..1] to 1-C, so black becomes white, white becomes black etc. For descendants implementors: Override it if necessary, otherwise the default implementation in this class will raise EInternalError. Source: src/images/castleimages_class_rgb_float.inc (line 42). | |
![]() |
procedure Clear(const Pixel: TVector4Byte); overload; override; |
|
This item has no description. Showing description inherited from TCastleImage.Clear. Set all image pixels to the same color. Source: src/images/castleimages_class_rgb_float.inc (line 44). | |
![]() |
function IsClear(const Pixel: TVector4Byte): boolean; overload; override; |
|
This item has no description. Showing description inherited from TCastleImage.IsClear. Check do all image pixels have the same color. Source: src/images/castleimages_class_rgb_float.inc (line 45). | |
![]() |
procedure Clear(const Pixel: TVector3); reintroduce; overload; |
|
This item has no description. Source: src/images/castleimages_class_rgb_float.inc (line 47). | |
![]() |
function IsClear(const Pixel: TVector3): boolean; reintroduce; overload; |
|
This item has no description. Source: src/images/castleimages_class_rgb_float.inc (line 48). | |
![]() |
function ToRGBImage: TRGBImage; deprecated 'create TRGBImage and use TRGBImage.Assign'; |
|
Warning: this symbol is deprecated: create TRGBImage and use TRGBImage.Assign Converts TRGBFloatImage to TRGBImage. Colors in pixels are simply rounded using Vector3Byte. So such conversion not only kills the floating-point precision in float format but also clamps color components to 0..1. Source: src/images/castleimages_class_rgb_float.inc (line 55). | |
![]() |
function ToFpImage: TInternalCastleFpImage; override; |
|
This item has no description. Showing description inherited from TEncodedImage.ToFpImage. Convert image contents to FpImage instance. The resulting instance is owned by the caller. Source: src/images/castleimages_class_rgb_float.inc (line 57). | |
![]() |
procedure ScaleColors(const Scale: Single); |
|
Every component (red, green, blue) of every pixel is multiplied by Scale. Source: src/images/castleimages_class_rgb_float.inc (line 62). | |
![]() |
procedure ExpColors(const Exp: Single); |
|
Every component (red, green, blue) or every pixel is changed to Power(Value, Exp). So e.g. Exp = 1/2.2 gives commonly used gamma correction. Source: src/images/castleimages_class_rgb_float.inc (line 67). | |
![]() |
procedure LerpWith(const Value: Single; SecondImage: TCastleImage); override; |
|
This item has no description. Showing description inherited from TCastleImage.LerpWith. Makes linear interpolation of colors from this image and the SecondImage. Intuitively, every pixel in new image is set to (1 - Value) * Self[pixel] + Value * SecondImage[pixel]
Both images need to have the exact same size. If they are not, EImageLerpDifferentSizes is raised. Not all TCastleImage combinations are allowed. Every subclass is required to override this to at least handle Lerp between itself. That is, TRGBImage.Lerp has to handle Lerp with other TRGBImage, TRGBAlphaImage.Lerp has to handle Lerp with other TRGBAlphaImage etc. Other combinations may be permitted, if useful and implemented. EImageLerpInvalidClasses is raised if given class combinations are not allowed. In this class, this simply always raises EImageLerpInvalidClasses.
Source: src/images/castleimages_class_rgb_float.inc (line 69). | |
![]() |
class procedure MixColors(const OutputColor: Pointer; const Weights: TVector4; const AColors: TVector4Pointer); override; |
|
This item has no description. Showing description inherited from TCastleImage.MixColors. Mix 4 colors, with 4 weights, into a resulting color. All 4 Colors and OutputColor must be pointers to a pixel of current image class, that is they must point to PixelSize bytes of memory. Source: src/images/castleimages_class_rgb_float.inc (line 70). | |
![]() |
procedure Assign(const Source: TCastleImage); override; |
|
This item has no description. Showing description inherited from TCastleImage.Assign. Copy size and contents from Source. This sets our size (Width, Height and Depth) to match Source image, and copies pixels from the Source image, converting them as closely as possible. For example, converting RGBA to RGB will strip alpha channel, but copy RGB values. When implementing descendants: the base implementation of this method in TCastleImage handles only the case when Image class equals our own class. And raises EImageAssignmentError in other cases. Override this method if you want to actually handle some conversions when assignning. Source: src/images/castleimages_class_rgb_float.inc (line 72). | |
Properties
![]() |
property Pixels: PVector3 read GetPixels; |
|
Pointer to pixels. Same as RawPixels, only typecasted to PVector3. Source: src/images/castleimages_class_rgb_float.inc (line 31). | |
![]() |
property RGBFloatPixels: PVector3 read GetPixels; deprecated 'use Pixels'; |
|
Warning: this symbol is deprecated: use Pixels This item has no description. Source: src/images/castleimages_class_rgb_float.inc (line 32). | |
![]() |
property PixelsArray: PVector3Array read GetPixelsArray; |
|
Pointer to pixels. Same as RawPixels, only typecasted to PVector3Array. Source: src/images/castleimages_class_rgb_float.inc (line 34). | |
Generated by PasDoc 0.17.0.snapshot.

