procedure RGB(var Bmp: TBitmap; R, G, B: Integer);
var
X, Y: Integer;
I: Byte;
ColorTable: array[0..255] of TRGBColor;
pRGB: PRGBColor;
begin
for I := 0 to 255 do
begin
ColorTable[I].R := Byte(I + R);
ColorTable[I].G := Byte(I + G);
ColorTable[I].B := Byte(I + B);
end; for Y := 0 to Bmp.Height - 1 do
begin
pRGB := Bmp.ScanLine[Y];
for X := 0 to Bmp.Width - 1 do
begin
pRGB.R := ColorTable[pRGB.R].R;
pRGB.G := ColorTable[pRGB.G].G;
pRGB.B := ColorTable[pRGB.B].B;
end;
Inc(pRGB);
end;
end;
我想问一下这段代码中的TRGBColor和PRGBColor是什么类型
要调用什么uses
var
X, Y: Integer;
I: Byte;
ColorTable: array[0..255] of TRGBColor;
pRGB: PRGBColor;
begin
for I := 0 to 255 do
begin
ColorTable[I].R := Byte(I + R);
ColorTable[I].G := Byte(I + G);
ColorTable[I].B := Byte(I + B);
end; for Y := 0 to Bmp.Height - 1 do
begin
pRGB := Bmp.ScanLine[Y];
for X := 0 to Bmp.Width - 1 do
begin
pRGB.R := ColorTable[pRGB.R].R;
pRGB.G := ColorTable[pRGB.G].G;
pRGB.B := ColorTable[pRGB.B].B;
end;
Inc(pRGB);
end;
end;
我想问一下这段代码中的TRGBColor和PRGBColor是什么类型
要调用什么uses
解决方案 »
- 法律方面的问题,我写的软件被人拿来干非法的事
- DELPHI2009如何调试DLL,试了很多方法都无法中断.谢谢!
- 在线等:问下如何让一个程序的窗体位于所有其他启动程序的最上面?
- delphi中打印条行码的问题,打印内容:一个号码,很急,谢谢各位大虾
- 如何根据其他表,建立一个表
- 用adoquery写入access数据库
- java做三层,delphi做三层,那个好
- 窗口最大化与任务条的关系?????
- *****************如何实现从网页中将URL托动到Edit中的效果?最好有源码********急!急!急!急!急!急!急!急!*******来者有分!!
- 现在TrackBar控件没有ShowSelRange嘛?
- 不知道如何解决比较好?
- 请教各位大侠一个关于在DELPHI中搞用SQL SERVER中的存储过程的问题
type
PRGBTripleArray = ^TRGBTripleArray;
TRGBTripleArray = array[0..32767] of TRGBTriple;
var
X, Y: Integer;
I: Byte;
ColorTable: array[0..255] of TRGBTriple;
pRGB: PRGBTripleArray;
begin
for I := 0 to 255 do
begin
ColorTable[I].rgbtRed := Byte(I + R);
ColorTable[I].rgbtGreen := Byte(I + G);
ColorTable[I].rgbtBlue := Byte(I + B);
end;
bmp.PixelFormat :=pf24bit;
for Y := 0 to Bmp.Height - 1 do
begin
pRGB := Bmp.ScanLine[Y];
for X := 0 to Bmp.Width - 1 do
begin
pRGB[x].rgbtRed := ColorTable[pRGB[x].rgbtRed].rgbtRed;
pRGB[x].rgbtGreen := ColorTable[pRGB[x].rgbtGreen].rgbtGreen;
pRGB[x].rgbtBlue := ColorTable[pRGB[x].rgbtBlue].rgbtBlue;
end;
Inc(pRGB);
end;
end;