An example of circular cell division can be seen below: This is the original image:
This command does not support signed data images.
For more information, refer to Applying Artistic Effects.
Pixelate Function - Before
Pixelate Function - After
View additional platform support for this Pixelate function.
Run the PixelateCommand on an image. by dividing it into circular cells with angle length = 5, and radius = 10.
using Leadtools;
using Leadtools.Codecs;
using Leadtools.ImageProcessing.SpecialEffects;
public void PixelateCommandExample()
{
// Load an image
RasterCodecs codecs = new RasterCodecs();
codecs.ThrowExceptionsOnInvalidImages = true;
RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "sample5.cmp"));
// Prepare the command
PixelateCommand command = new PixelateCommand();
command.CenterPoint = new LeadPoint((image.Width / 2), (image.Height / 2));
command.CellWidth = 5;
command.CellHeight = 10;
command.Opacity = 100;
command.Flags = PixelateCommandFlags.Radial |
PixelateCommandFlags.WidthPeriod |
PixelateCommandFlags.HeightPeriod |
PixelateCommandFlags.Average;
command.Run(image);
codecs.Save(image, Path.Combine(LEAD_VARS.ImagesDir, "Result.jpg"), RasterImageFormat.Jpeg, 24);
}
static class LEAD_VARS
{
public const string ImagesDir = @"C:\LEADTOOLS23\Resources\Images";
}
Leadtools.ImageProcessing.SpecialEffects Namespace
Leadtools.ImageProcessing.Effects.AddNoiseCommand
Leadtools.ImageProcessing.Effects.EmbossCommand
Leadtools.ImageProcessing.Effects.MosaicCommand
Leadtools.ImageProcessing.Effects.MotionBlurCommand
Leadtools.ImageProcessing.Effects.OilifyCommand
Leadtools.ImageProcessing.Color.PosterizeCommand
Leadtools.ImageProcessing.Color.RemoveRedEyeCommand
Leadtools.ImageProcessing.Color.SolarizeCommand
Leadtools.ImageProcessing.Effects.CubismCommand
Leadtools.ImageProcessing.Color.SampleTargetCommand
Leadtools.ImageProcessing.Effects.DisplacementCommand
Leadtools.ImageProcessing.Core.HalfTonePatternCommand
Leadtools.ImageProcessing.Effects.MaskConvolutionCommand