如何将一副已经加载到内存的 BMP 图形,调整其RGB值呢??倾我所有问这么一个问题!!

ddsft 2003-08-21 11:19:54
如何将一副已经加载到内存的 BMP 图形,调整其RGB值呢??

如何将一副已经加载到内存的 BMP 图形,调整其RGB值呢??
...全文
69 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
zjqyb 2003-08-21
  • 打赏
  • 举报
回复
bitmap->ScanLine
chenpeng20000 2003-08-21
  • 打赏
  • 举报
回复
struct rgbp
{int r;
int g;
int b;
};
rgbp rgb[1024][1024];//一结构体存放r,g,b值
int red,green,blue;
//***********************************
for(int i=0;i<y;i++)
for(int j=0;j<x;j++)
{
color=Bitmap1->Canvas->Pixels[i][j];
rgb[i][j].r=GetRValue(color);
rgb[i][j].g=GetGValue(color);
rgb[i][j].b=GetBValue(color);
}
//以下将red,green,blue改为你所期望的值
。。。
//
Bitmap1->Canvas->Pixels[i][j]=RGB(red,green,blue);//重新加载到bitmap

13,826

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder相关内容讨论区
社区管理员
  • 基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧