Vampyre Imaging Library Forum

Imaging Category => Bugs And Other Insects => Topic started by: davem on 1 November 2011, 11:09:25

Title: Two small bugs
Post by: davem on 1 November 2011, 11:09:25
  Hi,
  I have just installed the latest working version and found two small issues on delphi 2009 / Win 7 (they raise errors during compilation):

ImagingUtility.pas ([DCC Error] ImagingUtility.pas(1529): E2003 Undeclared identifier: 'Result')
Code (delphi) Select

{$IF Defined(DELPHI)}
  {$IF CompilerVersion >= 23}
  FloatFormatSettings := TFormatSettings.Create('en-US');
  {$ELSE}
  // FloatFormatSettings := GetLocaleFormatSettings(1033, Result);  // 1.11.2011
   GetLocaleFormatSettings(1033, FloatFormatSettings);
  {$IFEND}
{$ELSE FPC}
  FloatFormatSettings := DefaultFormatSettings;
  FloatFormatSettings.DecimalSeparator := '.';
{$IFEND}


ImagingRadiance.pas ([DCC Error] ImagingRadiance.pas(359): E2033 Types of actual and formal var parameters must be identical)
Code (delphi) Select

  procedure EncodeRgbe(const Src: TColor96FPRec; var Dest: TRgbe); {$IFDEF USE_INLINE}inline;{$ENDIF}
  var
    V, M: Extended; // {$IFDEF FPC}Float{$ELSE}Single{$ENDIF}; // 1.11.2011
..
      Frexp(V, M, E);     // 1.11.2011, here it used to report the error for M variable (


In both cases I did a correction, hopefully they are fine (see my comment 1.11.2011)

Apart from that I also get this warning: [DCC Hint] ImagingRadiance.pas(366): H2445 Inline function 'ClampToByte' has not been expanded because its unit 'ImagingUtility' is specified in USES statement of IMPLEMENTATION section and current function is inline function or being inline function

Title: Re: Two small bugs
Post by: Galfar on 1 November 2011, 23:50:04
Thanks for the report, working versions are not always tested in all Delphi versions :(
I'll update the repository with a fix in a short while.