Gorilla.Imaging.Formats
Unit Gorilla.Imaging.Formats.pasRecords
- record TPointRec
Enumerations
- enum TReduceColorsAction = ( raCreateHistogram, raUpdateHistogram, raMakeColorMap, raMapImage ) ;
- enum TSamplingFilter = ( sfNearest, sfLinear, sfCosine, sfHermite, sfQuadratic, sfGaussian, sfSpline, sfLanczos, sfMitchell, sfCatmullRom ) ;
Constants
- const AllReduceColorsActions : Set = [raCreateHistogram..raMapImage];
- const DefaultCubicFilter : TSamplingFilter = sfCatmullRom;
- const GrayConv : TColorFPRec = ;
- const OneDiv8Bit : Single = ;
- const OneDiv16Bit : Single = ;
Mics. types
- type TImageFormatInfoArray = array of PImageFormatInfo;
- type PImageFormatInfoArray = pointer to TImageFormatInfoArray;
- type TCluster = array of TPointRec;
- type TMappingTable = array of TCluster;
Functions / Procedures
- public procedure InitImageFormats ( var Infos : TImageFormatInfoArray ) ;
- public function Color24 ( R : Byte; G : Byte; B : Byte ) : TColor24Rec ; inline;
- public function Color32 ( A : Byte; R : Byte; G : Byte; B : Byte ) : TColor32Rec ; inline;
- public function Color48 ( R : Word; G : Word; B : Word ) : TColor48Rec ; inline;
- public function Color64 ( A : Word; R : Word; G : Word; B : Word ) : TColor64Rec ; inline;
- public function ColorFP ( A : Single; R : Single; G : Single; B : Single ) : TColorFPRec ; inline;
- public function ColorHF ( A : THalfFloat; R : THalfFloat; G : THalfFloat; B : THalfFloat ) : TColorHFRec ; inline;
- public procedure ReduceColorsMedianCut ( NumPixels : Integer; Src : PByte; Dst : PByte; SrcInfo : PImageFormatInfo; DstInfo : PImageFormatInfo; MaxColors : Integer; ChannelMask : Byte; DstPal : PPalette32; Actions : TReduceColorsActions = [raCreateHistogram..raMapImage] ) ;
- public procedure StretchNearest ( const SrcImage : TImageData; SrcX : Integer; SrcY : Integer; SrcWidth : Integer; SrcHeight : Integer; var DstImage : TImageData; DstX : Integer; DstY : Integer; DstWidth : Integer; DstHeight : Integer ) ;
- public procedure StretchResample ( const SrcImage : TImageData; SrcX : Integer; SrcY : Integer; SrcWidth : Integer; SrcHeight : Integer; var DstImage : TImageData; DstX : Integer; DstY : Integer; DstWidth : Integer; DstHeight : Integer; Filter : TSamplingFilter; WrapEdges : Boolean = False ) ; overload;
- public function BuildMappingTable ( DstLow : Integer; DstHigh : Integer; SrcLow : Integer; SrcHigh : Integer; SrcImageWidth : Integer; Filter : TFilterFunction; Radius : Single; WrapEdges : Boolean ) : TMappingTable ;
- public procedure FindExtremes ( const Map : TMappingTable; var MinPos : Integer; var MaxPos : Integer ) ;
- public procedure StretchResample ( const SrcImage : TImageData; SrcX : Integer; SrcY : Integer; SrcWidth : Integer; SrcHeight : Integer; var DstImage : TImageData; DstX : Integer; DstY : Integer; DstWidth : Integer; DstHeight : Integer; Filter : TFilterFunction; Radius : Single; WrapEdges : Boolean = False ) ; overload;
- public procedure FillMipMapLevel ( const BiggerLevel : TImageData; Width : Integer; Height : Integer; var SmallerLevel : TImageData ) ;
- public procedure CopyPixel ( Src : Pointer; Dest : Pointer; BytesPerPixel : Integer ) ; inline;
- public function ComparePixels ( PixelA : Pointer; PixelB : Pointer; BytesPerPixel : Integer ) : Boolean ; inline;
- public procedure TranslatePixel ( SrcPixel : Pointer; DstPixel : Pointer; SrcFormat : TImageFormat; DstFormat : TImageFormat; SrcPalette : PPalette32; DstPalette : PPalette32 ) ;
- public procedure ClampFloatPixel ( var PixF : TColorFPRec ) ; inline;
- public procedure AddPadBytes ( DataIn : Pointer; DataOut : Pointer; Width : Integer; Height : Integer; Bpp : Integer; WidthBytes : Integer ) ;
- public procedure RemovePadBytes ( DataIn : Pointer; DataOut : Pointer; Width : Integer; Height : Integer; Bpp : Integer; WidthBytes : Integer ) ;
- public procedure Convert1To8 ( DataIn : Pointer; DataOut : Pointer; Width : Integer; Height : Integer; WidthBytes : Integer ) ;
- public procedure Convert2To8 ( DataIn : Pointer; DataOut : Pointer; Width : Integer; Height : Integer; WidthBytes : Integer ) ;
- public procedure Convert4To8 ( DataIn : Pointer; DataOut : Pointer; Width : Integer; Height : Integer; WidthBytes : Integer ) ;
- public function Has16BitImageAlpha ( NumPixels : Integer; Data : PWord ) : Boolean ;
- public function Has32BitImageAlpha ( NumPixels : Integer; Data : PLongWord ) : Boolean ;
- public function GetScanLine ( ImageBits : Pointer; const FormatInfo : TImageFormatInfo; LineWidth : Integer; Index : Integer ) : Pointer ; inline;
- public function IsImageFormatValid ( Format : TImageFormat ) : Boolean ;
- public function HalfToFloat ( Half : THalfFloat ) : Single ;
- public function FloatToHalf ( Float : Single ) : THalfFloat ;
- public function ColorHalfToFloat ( ColorHF : TColorHFRec ) : TColorFPRec ; inline;
- public function ColorFloatToHalf ( ColorFP : TColorFPRec ) : TColorHFRec ; inline;
- public procedure VisualizePalette ( Pal : PPalette32; Entries : Integer; out PalImage : TImageData ) ;
- public procedure ChannelGetSrcPixel ( Src : PByte; SrcInfo : PImageFormatInfo; var Pix : TColor64Rec ) ;
- public procedure ChannelSetDstPixel ( Dst : PByte; DstInfo : PImageFormatInfo; const Pix : TColor64Rec ) ;
- public procedure GrayGetSrcPixel ( Src : PByte; SrcInfo : PImageFormatInfo; var Gray : TColor64Rec; var Alpha : Word ) ;
- public procedure GraySetDstPixel ( Dst : PByte; DstInfo : PImageFormatInfo; const Gray : TColor64Rec; Alpha : Word ) ;
- public procedure FloatGetSrcPixel ( Src : PByte; SrcInfo : PImageFormatInfo; var Pix : TColorFPRec ) ;
- public procedure FloatSetDstPixel ( Dst : PByte; DstInfo : PImageFormatInfo; const Pix : TColorFPRec ) ;
- public procedure IndexGetSrcPixel ( Src : PByte; SrcInfo : PImageFormatInfo; var Index : Cardinal ) ;
- public procedure IndexSetDstPixel ( Dst : PByte; DstInfo : PImageFormatInfo; Index : Cardinal ) ;
- public function GetPixel32Generic ( Bits : Pointer; Info : PImageFormatInfo; Palette : PPalette32 ) : TColor32Rec ;
- public procedure SetPixel32Generic ( Bits : Pointer; Info : PImageFormatInfo; Palette : PPalette32; const Color : TColor32Rec ) ;
- public function GetPixelFPGeneric ( Bits : Pointer; Info : PImageFormatInfo; Palette : PPalette32 ) : TColorFPRec ;
- public procedure SetPixelFPGeneric ( Bits : Pointer; Info : PImageFormatInfo; Palette : PPalette32; const Color : TColorFPRec ) ;
- public procedure ChannelToChannel ( NumPixels : Integer; Src : PByte; Dst : PByte; SrcInfo : PImageFormatInfo; DstInfo : PImageFormatInfo ) ;
- public procedure ChannelToGray ( NumPixels : Integer; Src : PByte; Dst : PByte; SrcInfo : PImageFormatInfo; DstInfo : PImageFormatInfo ) ;
- public procedure ChannelToFloat ( NumPixels : Integer; Src : PByte; Dst : PByte; SrcInfo : PImageFormatInfo; DstInfo : PImageFormatInfo ) ;
- public procedure ChannelToIndex ( NumPixels : Integer; Src : PByte; Dst : PByte; SrcInfo : PImageFormatInfo; DstInfo : PImageFormatInfo; DstPal : PPalette32 ) ;
- public procedure GrayToGray ( NumPixels : Integer; Src : PByte; Dst : PByte; SrcInfo : PImageFormatInfo; DstInfo : PImageFormatInfo ) ;
- public procedure GrayToChannel ( NumPixels : Integer; Src : PByte; Dst : PByte; SrcInfo : PImageFormatInfo; DstInfo : PImageFormatInfo ) ;
- public procedure GrayToFloat ( NumPixels : Integer; Src : PByte; Dst : PByte; SrcInfo : PImageFormatInfo; DstInfo : PImageFormatInfo ) ;
- public procedure GrayToIndex ( NumPixels : Integer; Src : PByte; Dst : PByte; SrcInfo : PImageFormatInfo; DstInfo : PImageFormatInfo; DstPal : PPalette32 ) ;
- public procedure FloatToFloat ( NumPixels : Integer; Src : PByte; Dst : PByte; SrcInfo : PImageFormatInfo; DstInfo : PImageFormatInfo ) ;
- public procedure FloatToChannel ( NumPixels : Integer; Src : PByte; Dst : PByte; SrcInfo : PImageFormatInfo; DstInfo : PImageFormatInfo ) ;
- public procedure FloatToGray ( NumPixels : Integer; Src : PByte; Dst : PByte; SrcInfo : PImageFormatInfo; DstInfo : PImageFormatInfo ) ;
- public procedure FloatToIndex ( NumPixels : Integer; Src : PByte; Dst : PByte; SrcInfo : PImageFormatInfo; DstInfo : PImageFormatInfo; DstPal : PPalette32 ) ;
- public procedure IndexToIndex ( NumPixels : Integer; Src : PByte; Dst : PByte; SrcInfo : PImageFormatInfo; DstInfo : PImageFormatInfo; SrcPal : PPalette32; DstPal : PPalette32 ) ;
- public procedure IndexToChannel ( NumPixels : Integer; Src : PByte; Dst : PByte; SrcInfo : PImageFormatInfo; DstInfo : PImageFormatInfo; SrcPal : PPalette32 ) ;
- public procedure IndexToGray ( NumPixels : Integer; Src : PByte; Dst : PByte; SrcInfo : PImageFormatInfo; DstInfo : PImageFormatInfo; SrcPal : PPalette32 ) ;
- public procedure IndexToFloat ( NumPixels : Integer; Src : PByte; Dst : PByte; SrcInfo : PImageFormatInfo; DstInfo : PImageFormatInfo; SrcPal : PPalette32 ) ;
- public procedure ConvertSpecial ( var Image : TImageData; SrcInfo : PImageFormatInfo; DstInfo : PImageFormatInfo ) ;