C# Класс Utilities.Media.SwiftBitmapExtensions

Показать файл Открыть проект

Открытые методы

Метод Описание
AddNoise ( this Image, int Amount = 10 ) : SwiftBitmap

adds noise to the image

AdjustBrightness ( this Image, int Value ) : SwiftBitmap

Adjusts the brightness

AdjustContrast ( this OriginalImage, float Value ) : SwiftBitmap

Adjusts the Contrast

AdjustGamma ( this OriginalImage, float Value = 1.0f ) : SwiftBitmap

Adjusts the Gamma

BlackAndWhite ( this Image ) : SwiftBitmap

Converts an SwiftBitmap to black and white

BlueFilter ( this Image ) : SwiftBitmap

Gets the blue filter for an image

BoxBlur ( this Image, int Size = 3 ) : SwiftBitmap

Does smoothing using a box blur

BumpMap ( this Image, Direction Direction = Direction.TopBottom, bool Invert = false ) : SwiftBitmap

Creates the bump map

Colorize ( this OriginalImage, Color Colors ) : SwiftBitmap

Colorizes a black and white image

Dilate ( this OriginalImage, int Size ) : SwiftBitmap

Does dilation

DrawRoundedRectangle ( this Image, Color BoxColor, int XPosition, int YPosition, int Height, int Width, int CornerRadius ) : SwiftBitmap

Draws a rounded rectangle on a SwiftBitmap

EdgeDetection ( this OriginalImage, float Threshold, Color EdgeColor ) : SwiftBitmap

Does basic edge detection on an image

Emboss ( this Image ) : SwiftBitmap

Emboss function

Equalize ( this OriginalImage ) : SwiftBitmap

Uses an RGB histogram to equalize the image

GaussianBlur ( this Image, int Size = 3 ) : SwiftBitmap

Does smoothing using a gaussian blur

GreenFilter ( this Image ) : SwiftBitmap

Gets the Green filter for an image

Jitter ( this OriginalImage, int MaxJitter = 5 ) : SwiftBitmap

Causes a "Jitter" effect

KuwaharaBlur ( this OriginalImage, int Size = 3 ) : SwiftBitmap

Does smoothing using a kuwahara blur

LaplaceEdgeDetection ( this Image ) : SwiftBitmap

Laplace edge detection function

MedianFilter ( this OriginalImage, int Size = 3 ) : SwiftBitmap

Does smoothing using a median filter

Negative ( this OriginalImage ) : SwiftBitmap

gets the negative of the image

NormalMap ( this ImageUsing, bool InvertX = false, bool InvertY = false ) : SwiftBitmap

Creates the normal map

Pixelate ( this OriginalImage, int PixelSize = 5 ) : SwiftBitmap

Pixelates an image

RedFilter ( this Image ) : SwiftBitmap

Gets the Red filter for an image

SNNBlur ( this OriginalImage, int Size = 3 ) : SwiftBitmap

Does smoothing using a SNN blur

SepiaTone ( this Image ) : SwiftBitmap

Converts an SwiftBitmap to sepia tone

Sharpen ( this Image ) : SwiftBitmap

Sharpens an image

SharpenLess ( this Image ) : SwiftBitmap

Sharpens an image

SinWave ( this OriginalImage, float Amplitude, float Frequency, bool XDirection, bool YDirection ) : SwiftBitmap

Does a "wave" effect on the image

SobelEdgeDetection ( this Input ) : SwiftBitmap

Sobel edge detection function

SobelEmboss ( this Image ) : SwiftBitmap

Sobel emboss function

StretchContrast ( this OriginalImage ) : SwiftBitmap

Stretches the contrast

Threshold ( this OriginalImage, float Threshold = 0.5f ) : SwiftBitmap

Does threshold manipulation of the image

ToASCIIArt ( this Input ) : string

Converts an SwiftBitmap to ASCII art

Turbulence ( this OriginalImage, int Roughness = 8, float Power = 5.0f, int Seed = 25123864 ) : SwiftBitmap

Does turbulence manipulation of the image

Watermark ( this Image, SwiftBitmap WatermarkImage, float Opacity, int X, int Y, Color KeyColor ) : SwiftBitmap

Adds a watermark to an image

Приватные методы

Метод Описание
Distance ( int R1, int R2, int G1, int G2, int B1, int B2 ) : double
GetHeight ( Color Color ) : float
GetHeight ( int x, int y, SwiftBitmap BlackAndWhiteData ) : float
GetMinMaxPixel ( Color &Min, Color &Max, SwiftBitmap ImageData ) : void
Map ( int Value, int Min, int Max ) : int

Описание методов

AddNoise() публичный статический Метод

adds noise to the image
public static AddNoise ( this Image, int Amount = 10 ) : SwiftBitmap
Image this The image to add noise to
Amount int Amount of noise to add (defaults to 10)
Результат SwiftBitmap

AdjustBrightness() публичный статический Метод

Adjusts the brightness
public static AdjustBrightness ( this Image, int Value ) : SwiftBitmap
Image this Image to change
Value int The value.
Результат SwiftBitmap

AdjustContrast() публичный статический Метод

Adjusts the Contrast
public static AdjustContrast ( this OriginalImage, float Value ) : SwiftBitmap
OriginalImage this Image to change
Value float Used to set the contrast (-100 to 100)
Результат SwiftBitmap

AdjustGamma() публичный статический Метод

Adjusts the Gamma
public static AdjustGamma ( this OriginalImage, float Value = 1.0f ) : SwiftBitmap
OriginalImage this Image to change
Value float Used to build the gamma ramp (usually .2 to 5)
Результат SwiftBitmap

BlackAndWhite() публичный статический Метод

Converts an SwiftBitmap to black and white
public static BlackAndWhite ( this Image ) : SwiftBitmap
Image this Image to change
Результат SwiftBitmap

BlueFilter() публичный статический Метод

Gets the blue filter for an image
public static BlueFilter ( this Image ) : SwiftBitmap
Image this Image to change
Результат SwiftBitmap

BoxBlur() публичный статический Метод

Does smoothing using a box blur
public static BoxBlur ( this Image, int Size = 3 ) : SwiftBitmap
Image this Image to manipulate
Size int Size of the aperture
Результат SwiftBitmap

BumpMap() публичный статический Метод

Creates the bump map
public static BumpMap ( this Image, Direction Direction = Direction.TopBottom, bool Invert = false ) : SwiftBitmap
Image this Image to create a bump map from
Direction Direction Direction of the bump map
Invert bool Inverts the direction of the bump map
Результат SwiftBitmap

Colorize() публичный статический Метод

Colorizes a black and white image
public static Colorize ( this OriginalImage, Color Colors ) : SwiftBitmap
OriginalImage this Black and white image
Colors Color Color array to use for the image
Результат SwiftBitmap

Dilate() публичный статический Метод

Does dilation
public static Dilate ( this OriginalImage, int Size ) : SwiftBitmap
OriginalImage this Image to manipulate
Size int Size of the aperture
Результат SwiftBitmap

DrawRoundedRectangle() публичный статический Метод

Draws a rounded rectangle on a SwiftBitmap
public static DrawRoundedRectangle ( this Image, Color BoxColor, int XPosition, int YPosition, int Height, int Width, int CornerRadius ) : SwiftBitmap
Image this Image to draw on
BoxColor Color The color that the box should be
XPosition int The upper right corner's x position
YPosition int The upper right corner's y position
Height int Height of the box
Width int Width of the box
CornerRadius int Radius of the corners
Результат SwiftBitmap

EdgeDetection() публичный статический Метод

Does basic edge detection on an image
public static EdgeDetection ( this OriginalImage, float Threshold, Color EdgeColor ) : SwiftBitmap
OriginalImage this Image to do edge detection on
Threshold float Decides what is considered an edge
EdgeColor Color Color of the edge
Результат SwiftBitmap

Emboss() публичный статический Метод

Emboss function
public static Emboss ( this Image ) : SwiftBitmap
Image this Image to manipulate
Результат SwiftBitmap

Equalize() публичный статический Метод

Uses an RGB histogram to equalize the image
public static Equalize ( this OriginalImage ) : SwiftBitmap
OriginalImage this Image to manipulate
Результат SwiftBitmap

GaussianBlur() публичный статический Метод

Does smoothing using a gaussian blur
public static GaussianBlur ( this Image, int Size = 3 ) : SwiftBitmap
Image this Image to manipulate
Size int Size of the aperture
Результат SwiftBitmap

GreenFilter() публичный статический Метод

Gets the Green filter for an image
public static GreenFilter ( this Image ) : SwiftBitmap
Image this Image to change
Результат SwiftBitmap

Jitter() публичный статический Метод

Causes a "Jitter" effect
public static Jitter ( this OriginalImage, int MaxJitter = 5 ) : SwiftBitmap
OriginalImage this Image to manipulate
MaxJitter int Maximum number of pixels the item can move
Результат SwiftBitmap

KuwaharaBlur() публичный статический Метод

Does smoothing using a kuwahara blur
public static KuwaharaBlur ( this OriginalImage, int Size = 3 ) : SwiftBitmap
OriginalImage this Image to manipulate
Size int Size of the aperture
Результат SwiftBitmap

LaplaceEdgeDetection() публичный статический Метод

Laplace edge detection function
public static LaplaceEdgeDetection ( this Image ) : SwiftBitmap
Image this Image to manipulate
Результат SwiftBitmap

MedianFilter() публичный статический Метод

Does smoothing using a median filter
public static MedianFilter ( this OriginalImage, int Size = 3 ) : SwiftBitmap
OriginalImage this Image to manipulate
Size int Size of the aperture
Результат SwiftBitmap

Negative() публичный статический Метод

gets the negative of the image
public static Negative ( this OriginalImage ) : SwiftBitmap
OriginalImage this Image to manipulate
Результат SwiftBitmap

NormalMap() публичный статический Метод

Creates the normal map
public static NormalMap ( this ImageUsing, bool InvertX = false, bool InvertY = false ) : SwiftBitmap
ImageUsing this Image to create the normal map from
InvertX bool Invert the X direction
InvertY bool Invert the Y direction
Результат SwiftBitmap

Pixelate() публичный статический Метод

Pixelates an image
public static Pixelate ( this OriginalImage, int PixelSize = 5 ) : SwiftBitmap
OriginalImage this Image to pixelate
PixelSize int Size of the "pixels" in pixels
Результат SwiftBitmap

RedFilter() публичный статический Метод

Gets the Red filter for an image
public static RedFilter ( this Image ) : SwiftBitmap
Image this Image to change
Результат SwiftBitmap

SNNBlur() публичный статический Метод

Does smoothing using a SNN blur
public static SNNBlur ( this OriginalImage, int Size = 3 ) : SwiftBitmap
OriginalImage this Image to manipulate
Size int Size of the aperture
Результат SwiftBitmap

SepiaTone() публичный статический Метод

Converts an SwiftBitmap to sepia tone
public static SepiaTone ( this Image ) : SwiftBitmap
Image this Image to change
Результат SwiftBitmap

Sharpen() публичный статический Метод

Sharpens an image
public static Sharpen ( this Image ) : SwiftBitmap
Image this Image to manipulate
Результат SwiftBitmap

SharpenLess() публичный статический Метод

Sharpens an image
public static SharpenLess ( this Image ) : SwiftBitmap
Image this Image to manipulate
Результат SwiftBitmap

SinWave() публичный статический Метод

Does a "wave" effect on the image
public static SinWave ( this OriginalImage, float Amplitude, float Frequency, bool XDirection, bool YDirection ) : SwiftBitmap
OriginalImage this Image to manipulate
Amplitude float Amplitude of the sine wave
Frequency float Frequency of the sine wave
XDirection bool Determines if this should be done in the X direction
YDirection bool Determines if this should be done in the Y direction
Результат SwiftBitmap

SobelEdgeDetection() публичный статический Метод

Sobel edge detection function
public static SobelEdgeDetection ( this Input ) : SwiftBitmap
Input this Image to manipulate
Результат SwiftBitmap

SobelEmboss() публичный статический Метод

Sobel emboss function
public static SobelEmboss ( this Image ) : SwiftBitmap
Image this Image to manipulate
Результат SwiftBitmap

StretchContrast() публичный статический Метод

Stretches the contrast
public static StretchContrast ( this OriginalImage ) : SwiftBitmap
OriginalImage this Image to manipulate
Результат SwiftBitmap

Threshold() публичный статический Метод

Does threshold manipulation of the image
public static Threshold ( this OriginalImage, float Threshold = 0.5f ) : SwiftBitmap
OriginalImage this Image to transform
Threshold float /// Float defining the threshold at which to set the pixel to black vs white. ///
Результат SwiftBitmap

ToASCIIArt() публичный статический Метод

Converts an SwiftBitmap to ASCII art
public static ToASCIIArt ( this Input ) : string
Input this The SwiftBitmap you wish to convert
Результат string

Turbulence() публичный статический Метод

Does turbulence manipulation of the image
public static Turbulence ( this OriginalImage, int Roughness = 8, float Power = 5.0f, int Seed = 25123864 ) : SwiftBitmap
OriginalImage this Image to transform
Roughness int Roughness of the movement
Power float How strong the movement is
Seed int Random seed
Результат SwiftBitmap

Watermark() публичный статический Метод

Adds a watermark to an image
public static Watermark ( this Image, SwiftBitmap WatermarkImage, float Opacity, int X, int Y, Color KeyColor ) : SwiftBitmap
Image this image to add the watermark to
WatermarkImage SwiftBitmap Watermark image
Opacity float /// Opacity of the watermark (1.0 to 0.0 with 1 being completely visible and 0 being invisible) ///
X int X position in pixels for the watermark
Y int Y position in pixels for the watermark
KeyColor Color /// Transparent color used in watermark image, set to null if not used ///
Результат SwiftBitmap