S
sw7309
Unregistered / Unconfirmed
GUEST, unregistred user!
我用如下代码想改变imgScan.picture.bitmap的调色板:
Pal.lPal.palVersion :=$300; //version of palette
Pal.lPal.palNumEntries :=256; //color sum of palette
GetPaletteEntries(ImgScan.Picture.BitMap.Palette,0,256,Pal.ColorEntry);
for i:=0 to 255 do
begin
Pal.ColorEntry[iColorIndex].peRed := 0;
Pal.ColorEntry[iColorIndex].peGreen := 0;
Pal.ColorEntry[iColorIndex].peBlue := 0;
end;
imgScan.Picture.Bitmap.Palette := CreatePalette(Pal.lPal);
invalidate();
但是发现改变的效果总是不显示,请各们高手会诊?
pal的声明如下:
LogPal = record //logical palette
lPal : TLogPalette;
ColorEntry:Array[0..255] of TPaletteEntry;
end;
pal : LogPal;
Pal.lPal.palVersion :=$300; //version of palette
Pal.lPal.palNumEntries :=256; //color sum of palette
GetPaletteEntries(ImgScan.Picture.BitMap.Palette,0,256,Pal.ColorEntry);
for i:=0 to 255 do
begin
Pal.ColorEntry[iColorIndex].peRed := 0;
Pal.ColorEntry[iColorIndex].peGreen := 0;
Pal.ColorEntry[iColorIndex].peBlue := 0;
end;
imgScan.Picture.Bitmap.Palette := CreatePalette(Pal.lPal);
invalidate();
但是发现改变的效果总是不显示,请各们高手会诊?
pal的声明如下:
LogPal = record //logical palette
lPal : TLogPalette;
ColorEntry:Array[0..255] of TPaletteEntry;
end;
pal : LogPal;