←Select platform

CubismCommand Class

Summary
Remaps the image into a collection of rotated rectangles (cubic faces) so that it appears to have been created in the Cubist art style.
Syntax
C#
C++/CLI
Python
public class CubismCommand : RasterCommand 
public ref class CubismCommand : public RasterCommand   
class CubismCommand(RasterCommand): 
Remarks
  • This command remaps the image into a collection of rotated rectangles (cubic faces), producing an image in a Cubist style. For an example, see the following figure:

    cubism-before.jpg
    The following figure shows the same image, after the effect has been applied:
    cubism-after.jpg
    To obtain this effect, the following settings were used with the command:
    1. Space = 5
    2. Length = 10
    3. Brightness = 0
    4. Angle = 0
    5. Color = new RasterColor(0, 0, 0)
    6. Flags = CubismCommandFlags.Background | CubismCommandFlags.Random | CubismCommandFlags.Rectangle
  • This command supports 12 and 16-bit grayscale and 48 and 64-bit color images. Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only in the Document/Medical toolkits.

  • This command does not support signed data images.
  • This command does not support 32-bit grayscale images.

For more information, refer to Correcting Colors.

Cubism Function - Before

Cubism Function - Before

Cubism Function - After

Cubism Function - After

View additional platform support for this Cubism function.

Example

Run the CubismCommand on an image.

C#
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.ImageProcessing.Effects; 
 
 
public void CubismCommandExample() 
{ 
   // Load an image 
   RasterCodecs codecs = new RasterCodecs(); 
   codecs.ThrowExceptionsOnInvalidImages = true; 
 
   RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, @"ImageProcessingDemo\Image2.jpg")); 
 
   // Prepare the command 
   CubismCommand command = new CubismCommand(); 
   command.Space = 5; 
   command.Length = 15; 
   command.Brightness = 200; 
   command.Angle = 4500; 
   command.FillColor = new RasterColor(255, 0, 0); 
   command.Flags = CubismCommandFlags.Color | CubismCommandFlags.Rectangle | CubismCommandFlags.Random; 
   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"; 
} 
Requirements

Target Platforms

See Also

Reference

CubismCommand Members

Leadtools.ImageProcessing.Effects Namespace

Correcting Colors

AddNoiseCommand Class

EmbossCommand Class

MosaicCommand Class

MotionBlurCommand Class

OilifyCommand Class

Leadtools.ImageProcessing.Color.PosterizeCommand

Leadtools.ImageProcessing.Color.RemoveRedEyeCommand

Leadtools.ImageProcessing.Color.SolarizeCommand

Leadtools.ImageProcessing.SpecialEffects.BumpMapCommand

Leadtools.ImageProcessing.SpecialEffects.DrawStarCommand

Leadtools.ImageProcessing.SpecialEffects.DryCommand

Leadtools.ImageProcessing.SpecialEffects.FreePlaneBendCommand

Leadtools.ImageProcessing.SpecialEffects.FreeRadialBendCommand

Leadtools.ImageProcessing.SpecialEffects.GlassEffectCommand

Leadtools.ImageProcessing.SpecialEffects.GlowCommand

Leadtools.ImageProcessing.SpecialEffects.LensFlareCommand

Leadtools.ImageProcessing.SpecialEffects.LightCommand

Leadtools.ImageProcessing.SpecialEffects.OceanCommand

Leadtools.ImageProcessing.SpecialEffects.PlaneBendCommand

Leadtools.ImageProcessing.SpecialEffects.PlaneCommand

Leadtools.ImageProcessing.Color.SampleTargetCommand

Leadtools.ImageProcessing.SpecialEffects.TunnelCommand

Leadtools.ImageProcessing.SpecialEffects.BendCommand

Leadtools.ImageProcessing.SpecialEffects.CylinderCommand

Leadtools.ImageProcessing.SpecialEffects.FreeHandShearCommand

Leadtools.ImageProcessing.SpecialEffects.FreeHandWaveCommand

Leadtools.ImageProcessing.SpecialEffects.ImpressionistCommand

Leadtools.ImageProcessing.SpecialEffects.PixelateCommand

Leadtools.ImageProcessing.SpecialEffects.PolarCommand

Leadtools.ImageProcessing.SpecialEffects.RadialBlurCommand

Leadtools.ImageProcessing.SpecialEffects.RadialWaveCommand

Leadtools.ImageProcessing.SpecialEffects.RippleCommand

Leadtools.ImageProcessing.SpecialEffects.SphereCommand

Leadtools.ImageProcessing.SpecialEffects.SwirlCommand

Leadtools.ImageProcessing.SpecialEffects.WaveCommand

Leadtools.ImageProcessing.SpecialEffects.WindCommand

Leadtools.ImageProcessing.SpecialEffects.ZoomBlurCommand

Leadtools.ImageProcessing.SpecialEffects.ZoomWaveCommand

Leadtools.ImageProcessing.SpecialEffects.BricksTextureCommand

Leadtools.ImageProcessing.SpecialEffects.CanvasCommand

Leadtools.ImageProcessing.SpecialEffects.CloudsCommand

Leadtools.ImageProcessing.SpecialEffects.ColoredBallsCommand

Leadtools.ImageProcessing.SpecialEffects.DiffuseGlowCommand

DisplacementCommand Class

Leadtools.ImageProcessing.SpecialEffects.FragmentCommand

Leadtools.ImageProcessing.Core.HalfTonePatternCommand

MaskConvolutionCommand Class

Leadtools.ImageProcessing.SpecialEffects.MosaicTilesCommand

OffsetCommand Class

Leadtools.ImageProcessing.SpecialEffects.PerspectiveCommand

Leadtools.ImageProcessing.SpecialEffects.PlasmaCommand

Leadtools.ImageProcessing.SpecialEffects.PointillistCommand

Leadtools.ImageProcessing.SpecialEffects.RomanMosaicCommand

Leadtools.ImageProcessing.SpecialEffects.VignetteCommand

Leadtools.ImageProcessing.SpecialEffects.ZigZagCommand

Leadtools.ImageProcessing.Color.AdjustTintCommand

ColorHalftoneCommand Class

Help Version 23.0.2024.3.3
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.ImageProcessing.Effects Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.