bmp缩小不失真。

yuanzhucn 2003-06-13 10:22:03
怎样缩小一个bmp图形而失真最少。我达到windows的画图程序的那样就可以了。
...全文
159 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
yuanzhucn 2003-06-22
  • 打赏
  • 举报
回复
procedure StretchDraw(const Rect: TRect; Graphic: TGraphic );这个函数压缩的效果没有windows带的画图程序的缩放好,我试过得。差的很远。
crossbow 2003-06-14
  • 打赏
  • 举报
回复
Description

Call StretchDraw to draw a graphic on the canvas so that the image fits in the specified rectangle. StretchDraw calls the Draw method of the graphic. The graphic object determines how to fit into the rectangle. This may involve changing magnification and/or aspect ratio.

To render the graphic in its natural size, use the Draw method, instead.

Graphics can be bitmaps, icons, or metafiles. If the graphic is a TBitmap object, the bitmap is rendered using the value of CopyMode.
crossbow 2003-06-14
  • 打赏
  • 举报
回复
有点麻烦,如果想简单用TCanvas.StretchDraw(); 很简单:

procedure StretchDraw(const Rect: TRect; Graphic: TGraphic );
yuanzhucn 2003-06-14
  • 打赏
  • 举报
回复
这个东西怎么用呢?
yuanzhucn 2003-06-14
  • 打赏
  • 举报
回复
可以吗?
crossbow 2003-06-14
  • 打赏
  • 举报
回复
楼上的写错了吧,是StretchBlt()
firetoucher 2003-06-13
  • 打赏
  • 举报
回复
用api函数strechblt

5,386

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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