Stefan de Beer
Stefan de Beer

Reputation: 1

Range error on Delphi's TLogPalettepalPalEntry

I am attempting to convert RAW image data into a bitmap, however when populating the palPalEntry values I get a range error.

Drilling down into the Winapi.Windows unit, I see the declaration is:

tagLOGPALETTE = record
  palVersion: Word;
  palNumEntries: Word;
  palPalEntry: array[0..0] of TPaletteEntry;
end;
TLogPalette = tagLOGPALETTE;

As far as I have it, it should be palPalEntry: array[0..254] of TPaletteEntry;

Am I missing something?

I am using Delphi 12 Community Edition.

Upvotes: 0

Views: 83

Answers (0)

Related Questions