救命啊 bmp 旋轉

psw 2004-07-20 02:26:03
救命啊 !

  有那位大哥指點一下.

procedure Rotate90(const Bitmap: TBitmap);
var
i, j: Integer;
rowIn, rowOut: PRGBTriple;
Bmp: TBitmap;
Width, Height: Integer;
begin
Bmp := TBitmap.Create;
Bmp.Width := Bitmap.Height;
Bmp.Height := Bitmap.Width;
Width := Bitmap.Width - 1;
Height := Bitmap.Height - 1;
for j := 0 to Height do
begin
rowIn := Bitmap.ScanLine[j];
for i := 0 to Width do
begin
rowOut := Bmp.ScanLine[i];
Inc(rowOut, Height - j);
rowOut^ := rowIn^;
Inc(rowIn);
end;
end;
Bitmap.Assign(Bmp);
end;

上面是一段將bmp圖形旋轉90度的function。為什麼只是底色有旋轉中間的圖形都不見了..

先謝謝各位了
...全文
41 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
psw 2004-07-20
  • 打赏
  • 举报
回复
xhlwyy:
請告訴我地址.
我是在http://dev.csdn.net/article/17/17193.shtm上看的.

先謝了
zhlwyy 2004-07-20
  • 打赏
  • 举报
回复
楼主看的是超级猛料上的例子吧
那上面有好多错误的
不过在它旁边有几篇
你可以参考呀
讲的都是图像旋转
delphi中基本图像处理代码

1,183

社区成员

发帖
与我相关
我的任务
社区描述
Delphi GAME,图形处理/多媒体
社区管理员
  • GAME,图形处理/多媒体社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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