ImageEn, unit imageenproc




procedure Pixelize(Amount: Double = 0.02; AmountIsPercentage: Boolean = true);


Pixelize filter renders the selected area using large color blocks. It is very similar to the effect seen on television when obscuring faces.
If AmountIsPercentage is true (Default), then Amount is a floating point value from 0 to 1 which specifies the size of the rectangular block as percentage (compared to the image size). Normally values would be less than 0.20 (20% of image size)
If AmountIsPercentage is false, then Amount is an integer value of which specifies the size of the rectangular block in pixels.

Original image:

Applying Pixelize(0.02) to the selected areas:

- 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


Demo  Demos\IEVision\NumberPlateBlurring\GetPlate.dpr
Demo  Demos\ImageEditing\EveryMethod\EveryMethod.dpr


// Load test image
ImageEnView1.IO.LoadFromFile( 'D:\TestImage.jpg' );


// Apply pixelation to the selection (with blocks of 2% of image width+height)
ImageEnView1.Proc.Pixelize( 0.02 );


// Apply pixelation to the selection with blocks of 15x15 pixels (which is the as the above for a 800x600 pixel image)
ImageEnView1.Proc.Pixelize( 15, False );