Procedure Tform1.button1click (Sender:tobject);
Var
Memostream,olestream:tstream;
Stream:istream;
Begin
Image1. Picture: =nil;
Image2. Picture: =nil;
Show initial photo
Image1. Picture.loadfromfile (' c:\logo.bmp ');
Memostream: = tmemorystream.create;
Try
Save your photos as Tmemorystream
Image1. Picture.Bitmap.SaveToStream (Memostream);
Memostream.position: = 0;
Turn the Tmemorystream into IStream
Stream:=tstreamadapter.create (Memostream);
Turn the IStream into Tolestream ==tmemorystream
Olestream: = Tolestream.create (Stream);
Image2. Picture.Bitmap.LoadFromStream (Olestream);
Finally
Memostream.free;
Olestream.free;
End
End
///////////////////////////
Uses
.................... Axctrls,activex; This two unit must be added
http://www.bkjia.com/PHPjc/319330.html www.bkjia.com true http://www.bkjia.com/PHPjc/319330.html techarticle Proceduretform1.button1click (sender:tobject); var Memostream,olestream:tstream; Stream:istream; Begin Image1. Picture:=nil; Image2. Picture:=nil; Displays the initial photo image1. Picture ....