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 : LongInt; Src : PByte; Dst : PByte; SrcInfo : PImageFormatInfo; DstInfo : PImageFormatInfo; MaxColors : LongInt; ChannelMask : Byte; DstPal : PPalette32; Actions : TReduceColorsActions = [raCreateHistogram..raMapImage] ) ;
- public procedure StretchNearest ( const SrcImage : TImageData; SrcX : LongInt; SrcY : LongInt; SrcWidth : LongInt; SrcHeight : LongInt; var DstImage : TImageData; DstX : LongInt; DstY : LongInt; DstWidth : LongInt; DstHeight : LongInt ) ;
- public procedure StretchResample ( const SrcImage : TImageData; SrcX : LongInt; SrcY : LongInt; SrcWidth : LongInt; SrcHeight : LongInt; var DstImage : TImageData; DstX : LongInt; DstY : LongInt; DstWidth : LongInt; DstHeight : LongInt; Filter : TSamplingFilter; WrapEdges : Boolean = False ) ; overload;
- public function BuildMappingTable ( DstLow : LongInt; DstHigh : LongInt; SrcLow : LongInt; SrcHigh : LongInt; SrcImageWidth : LongInt; Filter : TFilterFunction; Radius : Single; WrapEdges : Boolean ) : TMappingTable ;
- public procedure FindExtremes ( const Map : TMappingTable; var MinPos : LongInt; var MaxPos : LongInt ) ;
- public procedure StretchResample ( const SrcImage : TImageData; SrcX : LongInt; SrcY : LongInt; SrcWidth : LongInt; SrcHeight : LongInt; var DstImage : TImageData; DstX : LongInt; DstY : LongInt; DstWidth : LongInt; DstHeight : LongInt; Filter : TFilterFunction; Radius : Single; WrapEdges : Boolean = False ) ; overload;
- public procedure FillMipMapLevel ( const BiggerLevel : TImageData; Width : LongInt; Height : LongInt; var SmallerLevel : TImageData ) ;
- public procedure CopyPixel ( Src : Pointer; Dest : Pointer; BytesPerPixel : LongInt ) ; inline;
- public function ComparePixels ( PixelA : Pointer; PixelB : Pointer; BytesPerPixel : LongInt ) : 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 : LongInt; Height : LongInt; Bpp : LongInt; WidthBytes : LongInt ) ;
- public procedure RemovePadBytes ( DataIn : Pointer; DataOut : Pointer; Width : LongInt; Height : LongInt; Bpp : LongInt; WidthBytes : LongInt ) ;
- public procedure Convert1To8 ( DataIn : Pointer; DataOut : Pointer; Width : LongInt; Height : LongInt; WidthBytes : LongInt ) ;
- public procedure Convert2To8 ( DataIn : Pointer; DataOut : Pointer; Width : LongInt; Height : LongInt; WidthBytes : LongInt ) ;
- public procedure Convert4To8 ( DataIn : Pointer; DataOut : Pointer; Width : LongInt; Height : LongInt; WidthBytes : LongInt ) ;
- public function Has16BitImageAlpha ( NumPixels : LongInt; Data : PWord ) : Boolean ;
- public function Has32BitImageAlpha ( NumPixels : LongInt; Data : PLongWord ) : Boolean ;
- public function GetScanLine ( ImageBits : Pointer; const FormatInfo : TImageFormatInfo; LineWidth : LongInt; Index : LongInt ) : 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 : LongWord ) ;
- public procedure IndexSetDstPixel ( Dst : PByte; DstInfo : PImageFormatInfo; Index : LongWord ) ;
- 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 : LongInt; Src : PByte; Dst : PByte; SrcInfo : PImageFormatInfo; DstInfo : PImageFormatInfo ) ;
- public procedure ChannelToGray ( NumPixels : LongInt; Src : PByte; Dst : PByte; SrcInfo : PImageFormatInfo; DstInfo : PImageFormatInfo ) ;
- public procedure ChannelToFloat ( NumPixels : LongInt; Src : PByte; Dst : PByte; SrcInfo : PImageFormatInfo; DstInfo : PImageFormatInfo ) ;
- public procedure ChannelToIndex ( NumPixels : LongInt; Src : PByte; Dst : PByte; SrcInfo : PImageFormatInfo; DstInfo : PImageFormatInfo; DstPal : PPalette32 ) ;
- public procedure GrayToGray ( NumPixels : LongInt; Src : PByte; Dst : PByte; SrcInfo : PImageFormatInfo; DstInfo : PImageFormatInfo ) ;
- public procedure GrayToChannel ( NumPixels : LongInt; Src : PByte; Dst : PByte; SrcInfo : PImageFormatInfo; DstInfo : PImageFormatInfo ) ;
- public procedure GrayToFloat ( NumPixels : LongInt; Src : PByte; Dst : PByte; SrcInfo : PImageFormatInfo; DstInfo : PImageFormatInfo ) ;
- public procedure GrayToIndex ( NumPixels : LongInt; Src : PByte; Dst : PByte; SrcInfo : PImageFormatInfo; DstInfo : PImageFormatInfo; DstPal : PPalette32 ) ;
- public procedure FloatToFloat ( NumPixels : LongInt; Src : PByte; Dst : PByte; SrcInfo : PImageFormatInfo; DstInfo : PImageFormatInfo ) ;
- public procedure FloatToChannel ( NumPixels : LongInt; Src : PByte; Dst : PByte; SrcInfo : PImageFormatInfo; DstInfo : PImageFormatInfo ) ;
- public procedure FloatToGray ( NumPixels : LongInt; Src : PByte; Dst : PByte; SrcInfo : PImageFormatInfo; DstInfo : PImageFormatInfo ) ;
- public procedure FloatToIndex ( NumPixels : LongInt; Src : PByte; Dst : PByte; SrcInfo : PImageFormatInfo; DstInfo : PImageFormatInfo; DstPal : PPalette32 ) ;
- public procedure IndexToIndex ( NumPixels : LongInt; Src : PByte; Dst : PByte; SrcInfo : PImageFormatInfo; DstInfo : PImageFormatInfo; SrcPal : PPalette32; DstPal : PPalette32 ) ;
- public procedure IndexToChannel ( NumPixels : LongInt; Src : PByte; Dst : PByte; SrcInfo : PImageFormatInfo; DstInfo : PImageFormatInfo; SrcPal : PPalette32 ) ;
- public procedure IndexToGray ( NumPixels : LongInt; Src : PByte; Dst : PByte; SrcInfo : PImageFormatInfo; DstInfo : PImageFormatInfo; SrcPal : PPalette32 ) ;
- public procedure IndexToFloat ( NumPixels : LongInt; Src : PByte; Dst : PByte; SrcInfo : PImageFormatInfo; DstInfo : PImageFormatInfo; SrcPal : PPalette32 ) ;
- public procedure ConvertSpecial ( var Image : TImageData; SrcInfo : PImageFormatInfo; DstInfo : PImageFormatInfo ) ;