ImageEn, unit imageenproc |
|
TImageEnProc.BumpMapping
Declaration
procedure BumpMapping(LightX, LightY, LampX, LampY, pcf: Integer; Color: TRGB);
Description
Apply a bump mapping effect to the current image.
Bump mapping is a technique to apply bumps and wrinkles to the surface of an object. This is achieved by perturbing the surface normals of the object and using the perturbed normal during lighting calculations. The result is an apparently bumpy surface rather than a smooth surface.
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
Parameter | Description |
LightX/LightY | Source light position |
LampX/LampY | Width and height of the source light |
pcf | Percentage of the effect to apply to the original image (0 to 100) |
Color | Source light color |
| Demos\ImageEditing\EveryMethod\EveryMethod.dpr |
ImageEnView1.Proc.BumpMapping( 100, 100, 50, 50, 10, CreateRGB(255, 255, 255) );
// Load test image
ImageEnView1.IO.LoadFromFile( 'D:\TestImage.jpg' );
// Apply a bump mapping effect to the image
ImageEnView1.Proc.BumpMapping( ImageEnView1.IEBitmap.Width div 2,
ImageEnView1.IEBitmap.Height div 2,
50, 50,
10, CreateRGB(255, 255, 255) );
See Also
◼CreateRGB◼TRGB2TColor◼TColor2TRGB