ImageEn, unit imageenproc |
|
TImageEnProc.Lens
Declaration
procedure Lens(cx, cy, Width, Height: Integer; Refraction: Double);
Description
Apply a lens effect to the current image.
Parameter | Description |
cx | Horizontal lens position (center) |
cy | Vertical lens position (center) |
Width | Lens width |
Height | Lens height |
Refraction | Lens refraction (from 1) |
Note:
◼A UI for this is available to your users in the
Image Processing dialog◼If the image
PixelFormat is not ie24RGB, it will be converted
| Demos\ImageEditing\Lens\LensTest.dpr |
| Demos\ImageEditing\EveryMethod\EveryMethod.dpr |
// Load test image
ImageEnView1.IO.LoadFromFile( 'D:\TestImage.jpg' );
// Apply a lens effect to the center of the image
ImageEnView1.Proc.Lens( ImageEnView1.IEBitmap.Width div 2,
ImageEnView1.IEBitmap.Height div 2,
ImageEnView1.IEBitmap.Width,
ImageEnView1.IEBitmap.Height,
6 );