ImageEn, unit imageenproc |
|
TImageEnProc.CreateFromBitmap
Declaration
constructor CreateFromBitmap(Bitmap: TIEBitmap);
constructor CreateFromBitmap(Bitmap: TBitmap);
Description
Creates a new instance of TImageEnProc assigning the property
AttachedIEBitmap or
AttachedBitmap.
Note: Also sets
AutoUndo to
false.
Example
// Draw text onto a TBitmap or TIEBitmap
with TImageEnProc.CreateFromBitmap(myBitmap) do
begin
TextOut(Align_Text_Horz_Center, Align_Text_Near_Bottom, 'Me in Italy - 2015', 'Arial', 32, clRed, [fsBold]);
Free;
end;
// Load an image with a TBitmap, make it negative then save it
bmp := TBitmap.Create;
bmp.LoadFromFile('D:\image.bmp');
proc := TImageEnProc.CreateFromBitmap(bmp);
proc.Negative();
proc.Free;
bmp.Write('D:\output.bmp');
bmp.Free;
// Load an image rotate it 270 deg. clockwise and then save it
iebmp := TIEBitmap.Create;
iebmp.Read('D:\animage.jpeg');
proc := TImageEnProc.CreateFromBitmap(iebmp);
proc.Rotate(90);
proc.Free;
iebmp.Write('D:\output.jpeg');
iebmp.Free;