←Select platform

Density Property

Summary
Gets or sets a value that indicates the amount of detail in the cloud.
Syntax
C#
C++/CLI
Python
public int Density { get; set; } 
public: 
property int Density { 
   int get(); 
   void set (    int ); 
} 
Density # get and set (CloudsCommand) 

Property Value

Value that indicates the amount of detail in the cloud.

Remarks

Possible values range from 0 to 16. A value of 0 means no cloud texture will be created, while a value of 16 means the most cloud texture will be created. Use larger values to increase the detail in the clouds, smaller values for blurring.

Example
C#
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.ImageProcessing.SpecialEffects; 
 
 
public void CloudsCommandExample() 
{ 
   // Load an image 
   RasterCodecs codecs = new RasterCodecs(); 
   codecs.ThrowExceptionsOnInvalidImages = true; 
 
   RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "ImageProcessingDemo\\Image1.jpg")); 
 
   // Prepare the command 
   CloudsCommand command = new CloudsCommand(); 
   command.Seed = 1000; 
   command.Frequency = 4; 
   command.Density = 10; 
   command.Opacity = 10; 
   command.BackColor = new RasterColor(255, 255, 255); 
   command.CloudsColor = new RasterColor(0, 0, 0); 
   command.Type = CloudsCommandType.Difference; 
   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

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

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