| ImageEn, unit imageenproc | 
 | 
 
TImageEnProc.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
Convert 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 (defaults to black for first overload)  |  
 |  Overlay  |   If true, the resulting image is overlaid onto the original image (defaults to False for first overload)  |  
 |  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:
◼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\EveryMethod\EveryMethod.dpr  |  
// Load test image
ImageEnView1.IO.LoadFromFile( 'D:\TestImage.jpg' );
 
 
// Convert image to cartoon
ImageEnView1.Proc.Cartoonify( 2 );
ImageEnView1.Update();
 
 
// Overlay cartoon effect onto image
ImageEnView1.Proc.Cartoonify( clWhite, True );
 
 