图像合并问题---关于TImage上合并上多张Image图像

hai45 2005-01-22 08:18:45
我在Form中有一张大的图像Image1,在大图像上又加有多张小图像,Image2,Image3...
显示时效果很好,可是我想将这些图像保存在一张图像中Image1.
我在论坛上没有找到相关的资料,请大侠帮忙。
...全文
331 15 打赏 收藏 转发到动态 举报
写回复
用AI写文章
15 条回复
切换为时间正序
请发表友善的回复…
发表回复
MEFULEU 2005-06-20
  • 打赏
  • 举报
回复
constantine(飘遥的安吉儿)

什么时候转到这边来了!·
fontain 2005-06-16
  • 打赏
  • 举报
回复
使用tjpeg,导入图片,然后再存,你会发现小很多:)
henreash 2005-06-16
  • 打赏
  • 举报
回复
在canvas中调用一些函数把小图片拷贝到大图片中好像是什么 copystrXXX 记不得了,查查帮助.现在对BMP文件的处理技术很成熟了.呵呵 QQ 272733007
yahle 2005-01-24
  • 打赏
  • 举报
回复
bmp格式是未压缩的格式图片自然很大
hai45 2005-01-24
  • 打赏
  • 举报
回复
感谢大家,我找到了一种解决方法。可以实现我的要求。

可是又有了一个新问题,用temp.Picture.SaveToFile('temp.jpg');
和temp.Picture.SaveToFile('temp.BMP');
保存的文件都有1M之多怎样才能压缩?

procedure TForm1.N3Click(Sender: TObject);
var
BitmapSave:TBitmap;
RectD:TRect;
temp:TImage;
begin
BitmapSave:=TBitmap.Create;
temp:=TImage.Create(self);
try
Bitmapsave.Transparent := True;
Bitmapsave.PixelFormat:=pf24bit;
Bitmapsave.TransparentMode := tmAuto;
BitMapSave.Width:=BGImage.Width;
BitmapSave.Height:=BGimage.Height;
with RectD do
begin
top:=BGImage.Top;
left:=BGImage.Left;
Right:=BGImage.Width;
Bottom:=BGImage.Height;
end;
Bitmapsave.Canvas.StretchDraw(RectD,BGImage.Picture.Graphic);
with RectD do
begin
top:=photo.Top;
left:=photo.Left;
Right:=photo.Width+photo.Left;
Bottom:=photo.Height+photo.Top;
end;
Bitmapsave.Canvas.StretchDraw(RectD,photo.Picture.Graphic);
temp.Picture.Graphic:=Bitmapsave;
temp.Picture.SaveToFile('temp.jpg');

finally
Bitmapsave.Free;
end;

end;
mqjshanghai 2005-01-24
  • 打赏
  • 举报
回复
不懂,顶一下
hai45 2005-01-24
  • 打赏
  • 举报
回复
constantine(飘遥的安吉儿)
在论坛上我不知短信怎么发,能否把源码发给我,谢谢!

iswindy247@yahoo.com.cn
iswindy@126.com
naner_china 2005-01-24
  • 打赏
  • 举报
回复
学习!
ehom 2005-01-24
  • 打赏
  • 举报
回复
为什么总想着控件控件...图像是因为控件才存在的吗?TImage只是用于显示图像而已.
fontain 2005-01-23
  • 打赏
  • 举报
回复
使用yahle(yahle) 的方法
constantine 2005-01-23
  • 打赏
  • 举报
回复
只有bcb的,没有delphi的,如果要发条短信给我,留下你的email
yahle 2005-01-23
  • 打赏
  • 举报
回复
建立一个temp的Image1,然后把图象文件draw到上面再save就可以了。
Kshape_zh 2005-01-23
  • 打赏
  • 举报
回复
http://search.csdn.net/Expert/topic/53/53817.xml?temp=.8559229
wfhlxl 2005-01-23
  • 打赏
  • 举报
回复
image1.picture.bitmap.draw image2.picture.bitmap //image1 and image2 must be bitmap type
image1.picture.savetofile yourpicpath
Kshape_zh 2005-01-22
  • 打赏
  • 举报
回复
也许会用到这个函数:

The CombineRgn function combines two regions and stores the result in a third region. The two regions are combined according to the specified mode.

int CombineRgn(

HRGN hrgnDest, // handle to destination region
HRGN hrgnSrc1, // handle to source region
HRGN hrgnSrc2, // handle to source region
int fnCombineMode // region combining mode
);

1,183

社区成员

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

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