C# Class SoundInTheory.DynamicImage.Filters.ResizeFilter

Changes the size of a Layer. This filter can be used in several ways depending on the effect you wish to achieve.

There are five modes available for the ResizeFilter filter.

By default, images will not be enlarged if they are smaller than the target size. However, you can set the ResizeFilter.EnlargeImage property to true to allow enlargement.
Inheritance: ImageReplacementFilter
Afficher le fichier Open project: sitdap/dynamic-image Class Usage Examples

Méthodes protégées

Méthode Description
ApplyFilter ( FastBitmap source, System.Windows.Media.DrawingContext dc, int destinationWidth, int destinationHeight ) : void

Applies the ResizeFilter to the specified source.

GetDestinationDimensions ( FastBitmap source, int &width, int &height ) : bool

Returns the dimensions of the output image.

Private Methods

Méthode Description
CalculateOutputDimensions ( int nInputWidth, int nInputHeight, int nRequestedWidth, int nRequestedHeight, int &nOutputWidth, int &nOutputHeight ) : void

Method Details

ApplyFilter() protected méthode

Applies the ResizeFilter to the specified source.
protected ApplyFilter ( FastBitmap source, System.Windows.Media.DrawingContext dc, int destinationWidth, int destinationHeight ) : void
source FastBitmap The source image.
dc System.Windows.Media.DrawingContext
destinationWidth int
destinationHeight int
Résultat void

GetDestinationDimensions() protected méthode

Returns the dimensions of the output image.
protected GetDestinationDimensions ( FastBitmap source, int &width, int &height ) : bool
source FastBitmap The source image.
width int The desired width of the output image.
height int The desired height of the output image.
Résultat bool