Hi My Friends
With this Code Palette Changed
ImageEnView1.IEBitmap.Palette[AIndex] := TColor2TRGB(clGreen);
ImageEnView1.Update;
But i use this code to set all entries palette, but this dont work
procedure ChangePalette;
var
LogPal: TLogPalette;
hPal: HPalette;
PalEntry: array[0..255] of TPaletteEntry;
i: Integer;
begin
for i := 0 to 235 do
begin
PalEntry[i].peRed := i;
PalEntry[i].peGreen := i;
PalEntry[i].peBlue := i;
PalEntry[i].peFlags := PC_NOCOLLAPSE;
end;
LogPal.palVersion := $300;
LogPal.palNumEntries := 1;
hPal := CreatePalette(LogPal);
ResizePalette(hPal, 256);
SetPaletteEntries(hPal, 0, 256, PalEntry);
SelectPalette(ImageEnView1.IEBitmap.Canvas.Handle, hPal, FALSE);
RealizePalette(ImageEnView1.IEBitmap.Canvas.Handle);
end;
and try this code , so dont work
procedure changePalette;
pal: array[0..255] of TPALETTEENTRY;
begin
pal[2].peRed := 255;
pal[2].peGreen := 100;
pal[2].peBlue := 0;
pal[2].peFlags := 0;
SetPaletteEntries(ImageEnView1.Bitmap.Palette, 2, 255, pal);
end;
Please Help Me