13,826
社区成员
发帖
与我相关
我的任务
分享
TRGBTriple *ptr;
Graphics::TBitmap *bmp = new Graphics::TBitmap();
bmp = LoadFromFile(OpenPictureDialog1 -> FileName);
Image1 -> Picture -> Graphic = bmp;
int w = bmp -> Width;
int h = bmp -> Height;
for(int j = 0; j < h; j++)
ptr = (TRGBTriple*)bmp -> ScanLine[j];
for(int i = 0; i < w; i++)
ptr[i].rgbtRed = ~ptr[i].rgbtRed;
Image2 -> Picture -> Bitmap -> Assign(bmp);