LEADTOOLS Image Processing (Leadtools.ImageProcessing.Color assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.29
SolarizeCommand Class
See Also  Members  



Applies an effect that mimics the accidental exposure of photographic film to light. It does so by inverting all color data with an intensity value greater than or equal to the threshold that you specify. Supported in Silverlight, Windows Phone 7

Object Model

SolarizeCommand Class

Syntax

Visual Basic (Declaration) 
Public Class SolarizeCommand 
   Inherits Leadtools.ImageProcessing.RasterCommand
   Implements IRasterCommand 
Visual Basic (Usage)Copy Code
Dim instance As SolarizeCommand
C# 
public class SolarizeCommand : Leadtools.ImageProcessing.RasterCommand, IRasterCommand  
C++/CLI 
public ref class SolarizeCommand : public Leadtools.ImageProcessing.RasterCommand, IRasterCommand  

Example

Run the Leadtools.ImageProcessing.Color.SolarizeCommand on an image with threshold = 90.

Visual BasicCopy Code
Public Sub SolarizeCommandExample()
   Dim codecs As New RasterCodecs()
   codecs.ThrowExceptionsOnInvalidImages = True

   Dim leadImage As RasterImage = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "Master.jpg"))

   ' Prepare the command
   Dim command As SolarizeCommand = New SolarizeCommand
   'Solarize with threshold of 90.
   command.Threshold = 90

   command.Run(leadImage)
   codecs.Save(leadImage, Path.Combine(LEAD_VARS.ImagesDir, "Result.jpg"), RasterImageFormat.Jpeg, 24)

End Sub

Public NotInheritable Class LEAD_VARS
   Public Const ImagesDir As String = "C:\Users\Public\Documents\LEADTOOLS Images"
End Class
C#Copy Code
public void SolarizeCommandExample()
   {
      // Load an image
      RasterCodecs codecs = new RasterCodecs();
      codecs.ThrowExceptionsOnInvalidImages = true;

      RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "Master.jpg"));

      // Prepare the command
      SolarizeCommand command = new SolarizeCommand();
      //Solarize with threshold of 90.
      command.Threshold = 90;
      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:\Users\Public\Documents\LEADTOOLS Images";
}
SilverlightCSharpCopy Code
public void SolarizeCommandExample(RasterImage image, Stream outStream)
{
   // Prepare the command
   SolarizeCommand command = new SolarizeCommand();
   //Solarize with threshold of 90.
   command.Threshold = 90;
   command.Run(image);
   // Save result image
   RasterCodecs codecs = new RasterCodecs();
   codecs.Save(image, outStream, RasterImageFormat.Jpeg, 24);
   image.Dispose();
}
SilverlightVBCopy Code
Public Sub SolarizeCommandExample(ByVal image As RasterImage, ByVal outStream As Stream)
   ' Prepare the command
   Dim command As SolarizeCommand = New SolarizeCommand()
   'Solarize with threshold of 90.
   command.Threshold = 90
   command.Run(image)
   ' Save result image
   Dim codecs As RasterCodecs = New RasterCodecs()
   codecs.Save(image, outStream, RasterImageFormat.Jpeg, 24)
   image.Dispose()
End Sub

Remarks

  • 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 32-bit grayscale images.
For more information, refer to Applying Artistic Effects.

Inheritance Hierarchy

System.Object
   Leadtools.ImageProcessing.RasterCommand
      Leadtools.ImageProcessing.Color.SolarizeCommand

Requirements

Target Platforms: Silverlight, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7, MAC OS/X (Intel Only)

See Also

Reference

SolarizeCommand Members
Leadtools.ImageProcessing.Color Namespace
Applying Artistic Effects
Leadtools.ImageProcessing.Effects.AddNoiseCommand
Leadtools.ImageProcessing.Effects.SharpenCommand
PosterizeCommand Class
Leadtools.ImageProcessing.Effects.MosaicCommand
Leadtools.ImageProcessing.Effects.EmbossCommand
Leadtools.ImageProcessing.Effects.AverageCommand
Leadtools.ImageProcessing.Core.MedianCommand
IntensityDetectCommand Class
Leadtools.ImageProcessing.Effects.SpatialFilterCommand
Leadtools.ImageProcessing.Effects.BinaryFilterCommand
Leadtools.ImageProcessing.Core.MaximumCommand
Leadtools.ImageProcessing.Core.MinimumCommand
Leadtools.ImageProcessing.Effects.OilifyCommand
Leadtools.ImageProcessing.Core.WindowLevelCommand
Leadtools.ImageProcessing.SpecialEffects.BumpMapCommand
Leadtools.ImageProcessing.Effects.CubismCommand
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
SampleTargetCommand Class
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.PunchCommand
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.ShadowCommand
Leadtools.ImageProcessing.SpecialEffects.RevEffectCommand
Leadtools.ImageProcessing.SpecialEffects.AgingCommand
Leadtools.ImageProcessing.SpecialEffects.DiceEffectCommand
Leadtools.ImageProcessing.SpecialEffects.FunctionalLightCommand
Leadtools.ImageProcessing.SpecialEffects.PuzzleEffectCommand
Leadtools.ImageProcessing.SpecialEffects.RingEffectCommand
Leadtools.ImageProcessing.SpecialEffects.BricksTextureCommand
Leadtools.ImageProcessing.Core.DeskewCommand
Leadtools.ImageProcessing.SpecialEffects.DiffuseGlowCommand
Leadtools.ImageProcessing.SpecialEffects.GlowCommand
Leadtools.ImageProcessing.Core.HalfTonePatternCommand
Leadtools.ImageProcessing.Effects.HighPassCommand
Leadtools.ImageProcessing.Effects.MaskConvolutionCommand
Leadtools.ImageProcessing.SpecialEffects.PerspectiveCommand
Leadtools.ImageProcessing.SpecialEffects.PlasmaCommand
Leadtools.ImageProcessing.SpecialEffects.PointillistCommand
Leadtools.ImageProcessing.SpecialEffects.CanvasCommand
Leadtools.ImageProcessing.SpecialEffects.CloudsCommand
Leadtools.ImageProcessing.SpecialEffects.ColoredBallsCommand
Leadtools.ImageProcessing.SpecialEffects.DiffuseGlowCommand
Leadtools.ImageProcessing.Effects.DisplacementCommand
Leadtools.ImageProcessing.SpecialEffects.FragmentCommand
Leadtools.ImageProcessing.Effects.MaskConvolutionCommand
Leadtools.ImageProcessing.SpecialEffects.MosaicTilesCommand
Leadtools.ImageProcessing.Effects.OffsetCommand
Leadtools.ImageProcessing.SpecialEffects.RomanMosaicCommand
Leadtools.ImageProcessing.SpecialEffects.VignnetCommand
Leadtools.ImageProcessing.SpecialEffects.ZigZagCommand