Class TRGBFloatImage

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TRGBFloatImage = class(TCastleImage)

Description

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

Hierarchy

Overview

Methods

Public class function PixelSize: Cardinal; override;
Public class function ColorComponentsCount: Cardinal; override;
Public function PixelPtr(const X, Y: Cardinal; const Z: Cardinal = 0): PVector3Single;
Public function RowPtr(const Y: Cardinal; const Z: Cardinal = 0): PArray_Vector3Single;
Public procedure SetColorRGB(const x, y: Integer; const v: TVector3Single); override;
Public procedure Clear(const Pixel: TVector3Single); reintroduce;
Public function IsClear(const Pixel: TVector3Single): boolean; 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: TVector4Single; const Colors: TVector4Pointer); override;

Properties

Public property RGBFloatPixels: PVector3Single read GetRGBFloatPixels;

Description

Methods

Public class function PixelSize: Cardinal; override;
 
Public class function ColorComponentsCount: Cardinal; override;
 
Public function PixelPtr(const X, Y: Cardinal; const Z: Cardinal = 0): PVector3Single;
 
Public function RowPtr(const Y: Cardinal; const Z: Cardinal = 0): PArray_Vector3Single;
 
Public procedure SetColorRGB(const x, y: Integer; const v: TVector3Single); override;
 
Public procedure Clear(const Pixel: TVector3Single); reintroduce;
 
Public function IsClear(const Pixel: TVector3Single): boolean; reintroduce;
 
Public function ToRGBImage: TRGBImage;

Converts TRGBFloatImage to TRGBImage. Colors in pixels are simply rounded using Vector3Byte. So such convertion 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: TVector4Single; const Colors: TVector4Pointer); override;
 

Properties

Public property RGBFloatPixels: PVector3Single read GetRGBFloatPixels;

This is the same pointer as RawPixels, only typecasted to PVector3Single


Generated by PasDoc 0.13.0 on 2014-04-30 22:06:43