Class TRGBFloatImage

Unit

Declaration

type TRGBFloatImage = class(TCastleImage)

Description

Image with high-precision RGB colors encoded as 3 floats.

Hierarchy

Overview

Methods

Protected function GetColors(const X, Y, Z: Integer): TCastleColor; override;
Protected procedure SetColors(const X, Y, Z: Integer; const C: TCastleColor); override;
Public class function PixelSize: Cardinal; override;
Public class function ColorComponentsCount: Cardinal; override;
Public function PixelPtr(const X, Y: Cardinal; const Z: Cardinal = 0): PVector3;
Public function RowPtr(const Y: Cardinal; const Z: Cardinal = 0): PVector3Array;
Public procedure InvertColors; override;
Public procedure Clear(const Pixel: TVector4Byte); overload; override;
Public function IsClear(const Pixel: TVector4Byte): boolean; overload; override;
Public procedure Clear(const Pixel: TVector3); overload; reintroduce;
Public function IsClear(const Pixel: TVector3): boolean; overload; reintroduce;
Public function ToRGBImage: TRGBImage;
Public procedure ScaleColors(const Scale: Single);
Public procedure ExpColors(const Exp: Single);
Public procedure LerpWith(const Value: Single; SecondImage: TCastleImage); override;
Public class procedure MixColors(const OutputColor: Pointer; const Weights: TVector4; const AColors: TVector4Pointer); override;

Properties

Public property Pixels: PVector3 read GetPixels;
Public property RGBFloatPixels: PVector3 read GetPixels; deprecated 'use Pixels';
Public property PixelsArray: PVector3Array read GetPixelsArray;

Description

Methods

Protected function GetColors(const X, Y, Z: Integer): TCastleColor; override;
 
Protected procedure SetColors(const X, Y, Z: Integer; const C: TCastleColor); override;
 
Public class function PixelSize: Cardinal; override;
 
Public class function ColorComponentsCount: Cardinal; override;
 
Public function PixelPtr(const X, Y: Cardinal; const Z: Cardinal = 0): PVector3;
 
Public function RowPtr(const Y: Cardinal; const Z: Cardinal = 0): PVector3Array;
 
Public procedure InvertColors; override;
 
Public procedure Clear(const Pixel: TVector4Byte); overload; override;
 
Public function IsClear(const Pixel: TVector4Byte): boolean; overload; override;
 
Public procedure Clear(const Pixel: TVector3); overload; reintroduce;
 
Public function IsClear(const Pixel: TVector3): boolean; overload; reintroduce;
 
Public function ToRGBImage: TRGBImage;

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.

Public procedure ScaleColors(const Scale: Single);

Every component (red, green, blue) of every pixel is multiplied by Scale.

Public 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.

Public procedure LerpWith(const Value: Single; SecondImage: TCastleImage); override;
 
Public class procedure MixColors(const OutputColor: Pointer; const Weights: TVector4; const AColors: TVector4Pointer); override;
 

Properties

Public property Pixels: PVector3 read GetPixels;

Pointer to pixels. Same as RawPixels, only typecasted to PVector3.

Public property RGBFloatPixels: PVector3 read GetPixels; deprecated 'use Pixels';

Warning: this symbol is deprecated: use Pixels

 
Public property PixelsArray: PVector3Array read GetPixelsArray;

Pointer to pixels. Same as RawPixels, only typecasted to PVector3Array.


Generated by PasDoc 0.16.0.