ImageEn, unit imageenview

TImageEnView.Assign

TImageEnView.Assign


Declaration

procedure Assign(Source: TObject);


Description

Copy the content of a TBitmap, TImage, TGraphic, TPicture, TIcon, TIEBitmap, TImageEnView or TImageEnVect to the current control.
An exception is raised if Source is an unsupported type.

Note: To assign a TIEVisionImage, use AssignIEVisionImage


Example

// Copy content from another TImageEnView, including layers and IO params
ImageEnView1.Assign(ImageEnView2);

// Copy only the image of another TImageEnView (without meta-data, etc)
ImageEnView1.Assign(ImageEnView2.IEBitmap);

// Copy image from a TImage
ImageEnView1.Assign( Image1 );

// Copy image from a TBitmap
bmp := Bitmap.Create;
try
  GetBitmapFromInternalProcess( bmp );
  ImageEnView1.Assign( bmp );
finally
  bmp.free
end;

// Copy from a TGraphic class
jpg := TJpegImage.Create;
try
  jpg.Loadfromfile( 'D:\Image.jpg' );
  ImageEnView1.Assign( jpg );
finally
  jpg.free
end;


See Also

AssignIEVisionImage
AssignSelTo
AssignTo
CopyAllObjectsTo