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.
// 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 );
// Pixelize the image and trim any partial blocks (blockCount must be >= 2) blockCount := 10; blockSize := Round( min( ImageEnView1.IEBitmap.Width, ImageEnView1.IEBitmap.Height) / blockCount ); ImageEnView1.Proc.Pixelize( blockSize, False ); ImageEnView1.Proc.ImageResize( ImageEnView1.IEBitmap.Width div blockSize * blockSize, ImageEnView1.IEBitmap.Height div blockSize * blockSize );
// Apply pixelation to the selection with blocks of 15x15 pixels (which is the same as above for a 800x600 pixel image) ImageEnView1.Proc.Pixelize( 15, False );