Click or drag to resize

NDGradFilterCommand Class

Neutral Density (ND) Graduated Filter, Flexible in Location, Hardness and Density.

ND filters are used by photographers to compress the dynamic range of high contrast scenes into a smaller range which can be better viewed or printed. These filters feature a 'dark' half and a clear half, with the transition either soft or hard depending on the effect desired. The dark half is typically either 2 or 3 "f-stops" darker. Multiple filters can be applied to achieve a greater or more complex effect.

A typical use for an ND filter is to darken the bright skies in an image to bring its tonal values more in line with those of the darker foreground. Sunrises, sunsets, horizon shots, canyons and other contrasty landscapes are good candidates for an ND filter.

The PhotoEffects ND Graduated is incredibly flexible, allowing you to adjust where in the image you want the effect applied (using the Location property), how dramatic you want the effect (using the Density parameter), how hard or soft you want the transition (using the Hardness property), how large an area you want the effect portion of the filter to cover (using the Radius property), and the angle at which you want the effect (using the Angle property). Angled effects are important if you have a diagonal sun/shade line or other non-horizontal dark/light division in your image.

The PhotoEffects ND filter can even provide "impossible" effects by allowing you to set the density of the "light" side of the filter. With traditional filters this is always transparent (a value of 1) but with the PhotoEffects filter you can set the starting density to be brighter or darker.

Inheritance Hierarchy
SystemObject
  Atalasoft.Imaging.ImageProcessingImageCommand
    Atalasoft.Imaging.ImageProcessing.EffectsNDGradFilterCommand

Namespace:  Atalasoft.Imaging.ImageProcessing.Effects
Assembly:  Atalasoft.dotImage.AdvancedPhotoEffects (in Atalasoft.dotImage.AdvancedPhotoEffects.dll) Version: 11.0.0.0.0.297 (.NET 4.5.2, x86)
Syntax
[SerializableAttribute]
public class NDGradFilterCommand : ImageCommand, 
	ISerializable

The NDGradFilterCommand type exposes the following members.

Constructors
  NameDescription
Public methodNDGradFilterCommand
Initializes a new instance of the NDGradFilterCommand class.
Protected methodNDGradFilterCommand(SerializationInfo, StreamingContext)
Initializes a new instance of the NDGradFilterCommand class with serialized data.
Public methodNDGradFilterCommand(Double, Double, Double, Double)
Initializes a new instance of the NDGradFilterCommand class with values for location, density, radius, and hardness.
Top
Properties
  NameDescription
Public propertyAngle
Gets or sets the angle of effect in degrees. 0 is horizontal (horizon). +/- 90 is vertical, etc.
Public propertyApplyToAnyPixelFormat
Reports whether or not this command will be applied to any supplied PixelFormat image
(Inherited from ImageCommand.)
Public propertyCanApplyToAnyPixelFormat
Returns true if the command can be applied to any PixelFormat.
(Inherited from ImageCommand.)
Public propertyDensity
Gets or sets the density - the strength of the filter, roughly in f-stops.
Public propertyFilterType
Gets or sets the filter to use for the ND Graduated Filter.
Public propertyHardness
Gets or sets a value indicating the hardness of the filter, expressed as a Gamma / Power value. 1 is nearly linear, higher values are higher gamma/contrast transitions
Public propertyInPlaceProcessing
Gets a value indicating if the source image data is processed in-place as opposed to returning a new image.
(Overrides ImageCommandInPlaceProcessing.)
Public propertyLocation
Gets or sets the location of the center of the filter effect from the top of the image (0) to the bottom (1).
Public propertyProgress
Gets or sets the ProgressEventHandler delegate which can be used to view or cancel the progress of the current process.
(Inherited from ImageCommand.)
Public propertyRadius
Gets or sets the radius.
Public propertyStartDensity
Gets or sets the starting density.
Public propertySupportedPixelFormats
Gets an array of supported pixel formats.
(Overrides ImageCommandSupportedPixelFormats.)
Top
Methods
  NameDescription
Public methodApply
Apply the command to the given image.
(Inherited from ImageCommand.)
Public methodApplyToImage Obsolete.
Applies the command to the source AtalaImage.
(Inherited from ImageCommand.)
Protected methodConstructChangedSourceImage
The method is called by the default implementation of Apply. It determines if it is necessary to create a copy of the source image in a different pixel format and if so, determines the best new pixel format and allocates that image.
(Inherited from ImageCommand.)
Protected methodConstructFinalImage
Called by the default implementation of Apply, ConstructFinalImage constructs the image that will be used as the destination image for the command.
(Inherited from ImageCommand.)
Protected methodConstructImageResults
Constructs the results object for this command.
(Inherited from ImageCommand.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Protected methodGetChangedPixelFormat
This method is called to change the pixel format of the source image.
(Inherited from ImageCommand.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetObjectData
Populates a SerializationInfo with the data needed to serialize the target object.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodImageCommandGetObjectData
Aggregates ImageCommand data into the supplied SerializationInfo object.
(Inherited from ImageCommand.)
Public methodIsPixelFormatSupported
Returns a value indicating if the specified pixel format is supported.
(Inherited from ImageCommand.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodPerformActualCommand
PerformActualCommand does the actual work of the image processing command.
(Overrides ImageCommandPerformActualCommand(AtalaImage, AtalaImage, Rectangle, ImageResults).)
Protected methodSelectBestAlternatePixelFormat
Choose the best pixel format to use for this command when the supplied source image's pixel format is unacceptable.
(Inherited from ImageCommand.)
Protected methodSelectPreferredPixelFormat
Chooses a pixel format that is preferred for this command.
(Inherited from ImageCommand.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Protected methodVerifyImage
Verify the integrity of an AtalaImage.
(Inherited from ImageCommand.)
Protected methodVerifyProperties
Verify the integrity of properties in the command before processing an image.
(Overrides ImageCommandVerifyProperties(AtalaImage).)
Top
See Also