图片地址:
http://61.145.230.62/photo/pic1.bmp
http://61.145.230.62/photo/pic2.bmp
http://61.145.230.62/photo/pic3.bmp
http://61.145.230.62/photo/pic4.bmp
http://61.145.230.62/photo/pic5.bmp
http://61.145.230.62/photo/pic6.bmp
http://61.145.230.62/photo/pic1.bmp
http://61.145.230.62/photo/pic2.bmp
http://61.145.230.62/photo/pic3.bmp
http://61.145.230.62/photo/pic4.bmp
http://61.145.230.62/photo/pic5.bmp
http://61.145.230.62/photo/pic6.bmp
解决方案 »
- 将PDF文件打包在资源文件,如何不用另存,直接用外部PDF阅读器打开?
- 求助 动态表单设计
- ListView控件中的排序的问题
- 为什么我无法动态创建LABEL等控件而可以动态创建窗体?
- 散20分给进来的前两个水友们
- 请问:database Desktop中表的完整性约束问题
- 增加数据库字段
- 请问谁有delphi7的下载地址,谢谢了!
- 在Delphi中怎样使用winpcap,请高手赐教!高分相谢。
- 关于技术与资金合作--------请关注!!
- [***求助***][在线等]关于ShowMessage、MsgDlg!高手请进
- 一个字串在debug时,显示为:'字串A'#4#4#4,字串本身值为:字串A ,如何去掉后面的#4#4#4
var
X, Y: integer;
P: pByteArray;
newbmp: TBitmap;
gray: byte;
begin
newbmp := TBitmap.Create;
newbmp.PixelFormat := bitmap.PixelFormat;
newbmp.Assign(bitmap);
for Y := 0 to bitmap.Height - 1 do
begin
P := newbmp.ScanLine[Y];
for X := 0 to bitmap.Width - 1 do
begin
gray := Round(0.299 * P[3 * X + 2] + 0.587 * P[3 * X + 1] + 0.11
*
P[3 * X]);
// 灰化的计算公式
if (gray > 128) then // 这里128为阙值,这个需要你自己的需求看是否用这么多,也可以用动态阈值法
gray := 255
else
gray := 0;
P[3 * X + 2] := gray;
P[3 * X + 1] := gray;
P[3 * X] := gray;
end;
end;
bitmap.Assign(newbmp);
end;