--- oup/current/Global/OniImgClass.pas 2007/05/26 14:24:55 193 +++ oup/current/Global/OniImgClass.pas 2007/05/26 18:26:48 194 @@ -15,6 +15,7 @@ type function GetHeight(MipGen: Integer): Integer; function GetImageFormat: TImageFormat; procedure SetImageFormat(Format: TImageFormat); + function pGetImageFormatInfo: TImageFormatInfo; function GetHasMipMaps: Boolean; protected public @@ -23,6 +24,7 @@ type property Width[MipGen: Integer]: Integer read GetWidth; property Height[MipGen: Integer]: Integer read GetHeight; property Format: TImageFormat read GetImageFormat write SetImageFormat; + property FormatInfo: TImageFormatInfo read pGetImageFormatInfo; property HasMipMaps: Boolean read GetHasMipMaps; constructor Create; @@ -130,6 +132,13 @@ begin end; +function TOniImage.pGetImageFormatInfo: TImageFormatInfo; +begin + if Length(FImages) > 0 then + GetImageFormatInfo(FImages[0].Format, Result); +end; + + function TOniImage.GetHasMipMaps: Boolean; begin Result := Length(FImages) > 1;