ImageEn, unit iexHelperFunctions |
|
TIEBitmapHelper.Cartoonify
Declaration
procedure Cartoonify(Radius: Integer = 2; RemoveNoiseSize: Integer = 20; ThresholdWinSize: Integer = 4; ThresholdOffset: Integer = 4; ContrastLevel: Integer = 30); overload;
procedure Cartoonify(LineColor: TColor; Overlay: Boolean; Radius: Integer = 2; RemoveNoiseSize: Integer = 20; ThresholdWinSize: Integer = 4; ThresholdOffset: Integer = 4; ContrastLevel: Integer = 30); overload;
Description
Converts the image to a cartoon line effect.
The second overload allows you to specify the line color and optionally overlay it upon the existing image
Parameter | Description |
LineColor | The color to draw the lines |
Overlay | If true, the resulting image is overlaid onto the original image |
RemoveNoiseSize | Any noise smaller than the specified size (in pixels) will be removed (See: RemoveIsolatedPixels) |
ThresholdWinSize | Specifies the Window Size for the thresholding (converting the image to monochrome) |
ThresholdOffset | Specifies the Offset for the thresholding (converting the image to monochrome) |
ContrastLevel | Specify the amount of contrasting to apply to darken the resulting lines |
Note:
◼ You must add the iexHelperFunctions unit to your uses clause
◼ You must call
Update if attached to a TImageEnView
Demo
| Demos\ImageEditing\EveryMethod\EveryMethod.dpr |
Examples
// Load test image
ImageEnView1.IO.LoadFromFile( 'D:\TestImage.jpg' );
// Convert image to cartoon
ImageEnView1.IEBitmap.Cartoonify( clRed );
ImageEnView1.Update();
// Overlay cartoon effect onto image
ImageEnView1.IEBitmap.Cartoonify( clBlack, True );
ImageEnView1.Update();