C# Class Utilities.Media.SwiftBitmap

Bitmap wrapper. Helps make Bitmap access faster and a bit simpler.
Inheritance: Utilities.DataTypes.Patterns.BaseClasses.SafeDisposableBaseClass, ICloneable
Afficher le fichier Open project: JaCraig/Craig-s-Utility-Library Class Usage Examples

Private Properties

Свойство Type Description
GetImageFormat System.Drawing.Imaging.ImageFormat
GetPixelSize int

Méthodes publiques

Méthode Description
ApplyColorMatrix ( System matrix ) : SwiftBitmap

Applies the matrix.

ApplyColorMatrix ( float matrix ) : SwiftBitmap

Applies the matrix.

ApplyConvolutionFilter ( int filter, bool absolute = false, int offset ) : SwiftBitmap

Applies the convolution filter to the image

Clone ( ) : object

Creates a new object that is a copy of the current instance.

Copy ( SwiftBitmap SwiftBitmap ) : SwiftBitmap

Copies the image from one image to this one.

Crop ( int Width, int Height, Align VAlignment, Align HAlignment ) : SwiftBitmap

Crops the image by the specified width/height

DrawPath ( Pen pen, GraphicsPath path ) : SwiftBitmap

Draws the path specified

DrawText ( string TextToDraw, Font FontToUse, Brush BrushUsing, RectangleF BoxToDrawWithin ) : SwiftBitmap

Draws the text specified

Fill ( Color color ) : SwiftBitmap

Fills the image with the specified color.

GetPixel ( int position ) : Color

Gets the pixel.

GetPixel ( int x, int y ) : Color

Gets the pixel.

Lock ( ) : SwiftBitmap

Locks this instance.

Resize ( int Width, int Height, Quality Quality = Quality.Low ) : SwiftBitmap

Resizes an SwiftBitmap to a certain height

Rotate ( RotateFlipType flipType ) : SwiftBitmap

Rotates and/or flips the image

Rotate ( float DegreesToRotate ) : SwiftBitmap

Rotates an image

Save ( string fileName ) : SwiftBitmap

Saves to the specified file name.

SetPixel ( int x, int y, Color pixelColor ) : SwiftBitmap

Sets the pixel.

SetPixels ( int x, int y, Color pixels ) : SwiftBitmap

Sets the pixels starting at the x and y coordinate specified.

SwiftBitmap ( Bitmap bitmap ) : System

Initializes a new instance of the SwiftBitmap class.

SwiftBitmap ( Image image ) : System

Initializes a new instance of the SwiftBitmap class.

SwiftBitmap ( Stream stream ) : System

Initializes a new instance of the SwiftBitmap class.

SwiftBitmap ( int width, int height ) : System

Initializes a new instance of the SwiftBitmap class.

SwiftBitmap ( string fileName ) : System

Initializes a new instance of the SwiftBitmap class.

ToString ( ImageFormat desiredFormat ) : string

Converts an SwiftBitmap to a base64 string and returns it

Unlock ( ) : SwiftBitmap

Unlocks this SwiftBitmap

operator ( ) : SwiftBitmap

Implements the operator &.

Méthodes protégées

Méthode Description
Dispose ( bool Managed ) : void

Function to override in order to dispose objects

Private Methods

Méthode Description
GetImageFormat ( string fileName ) : ImageFormat

Returns the SwiftBitmap format this file is using

GetPixelSize ( ) : int

Gets the size of the pixel.

Method Details

ApplyColorMatrix() public méthode

Applies the matrix.
public ApplyColorMatrix ( System matrix ) : SwiftBitmap
matrix System The matrix.
Résultat SwiftBitmap

ApplyColorMatrix() public méthode

Applies the matrix.
public ApplyColorMatrix ( float matrix ) : SwiftBitmap
matrix float The matrix.
Résultat SwiftBitmap

ApplyConvolutionFilter() public méthode

Applies the convolution filter to the image
public ApplyConvolutionFilter ( int filter, bool absolute = false, int offset ) : SwiftBitmap
filter int The filter.
absolute bool if set to true then the absolute value is used
offset int The offset to use for each pixel
Résultat SwiftBitmap

Clone() public méthode

Creates a new object that is a copy of the current instance.
public Clone ( ) : object
Résultat object

Copy() public méthode

Copies the image from one image to this one.
public Copy ( SwiftBitmap SwiftBitmap ) : SwiftBitmap
SwiftBitmap SwiftBitmap The SwiftBitmap to copy from.
Résultat SwiftBitmap

Crop() public méthode

Crops the image by the specified width/height
public Crop ( int Width, int Height, Align VAlignment, Align HAlignment ) : SwiftBitmap
Width int The width.
Height int The height.
VAlignment Align The v alignment.
HAlignment Align The h alignment.
Résultat SwiftBitmap

Dispose() protected méthode

Function to override in order to dispose objects
protected Dispose ( bool Managed ) : void
Managed bool /// If true, managed and unmanaged objects should be disposed. Otherwise unmanaged objects only. ///
Résultat void

DrawPath() public méthode

Draws the path specified
public DrawPath ( Pen pen, GraphicsPath path ) : SwiftBitmap
pen System.Drawing.Pen The pen to use.
path System.Drawing.Drawing2D.GraphicsPath The path to draw
Résultat SwiftBitmap

DrawText() public méthode

Draws the text specified
public DrawText ( string TextToDraw, Font FontToUse, Brush BrushUsing, RectangleF BoxToDrawWithin ) : SwiftBitmap
TextToDraw string The text to draw.
FontToUse System.Drawing.Font The font to use.
BrushUsing System.Drawing.Brush The brush to use.
BoxToDrawWithin System.Drawing.RectangleF The box to draw within.
Résultat SwiftBitmap

Fill() public méthode

Fills the image with the specified color.
public Fill ( Color color ) : SwiftBitmap
color Color The color.
Résultat SwiftBitmap

GetPixel() public méthode

Gets the pixel.
public GetPixel ( int position ) : Color
position int The position in the image
Résultat Color

GetPixel() public méthode

Gets the pixel.
public GetPixel ( int x, int y ) : Color
x int The x position
y int The y position
Résultat Color

Lock() public méthode

Locks this instance.
public Lock ( ) : SwiftBitmap
Résultat SwiftBitmap

Resize() public méthode

Resizes an SwiftBitmap to a certain height
public Resize ( int Width, int Height, Quality Quality = Quality.Low ) : SwiftBitmap
Width int New width for the final image
Height int New height for the final image
Quality Quality Quality of the resizing
Résultat SwiftBitmap

Rotate() public méthode

Rotates and/or flips the image
public Rotate ( RotateFlipType flipType ) : SwiftBitmap
flipType RotateFlipType Type of flip/rotation to do
Résultat SwiftBitmap

Rotate() public méthode

Rotates an image
public Rotate ( float DegreesToRotate ) : SwiftBitmap
DegreesToRotate float Degrees to rotate the image
Résultat SwiftBitmap

Save() public méthode

Saves to the specified file name.
public Save ( string fileName ) : SwiftBitmap
fileName string Name of the file.
Résultat SwiftBitmap

SetPixel() public méthode

Sets the pixel.
public SetPixel ( int x, int y, Color pixelColor ) : SwiftBitmap
x int The x position
y int The y position
pixelColor Color Color of the pixel.
Résultat SwiftBitmap

SetPixels() public méthode

Sets the pixels starting at the x and y coordinate specified.
public SetPixels ( int x, int y, Color pixels ) : SwiftBitmap
x int The beginning x coordinate
y int The beginning y coordinate
pixels Color The pixels to set
Résultat SwiftBitmap

SwiftBitmap() public méthode

Initializes a new instance of the SwiftBitmap class.
public SwiftBitmap ( Bitmap bitmap ) : System
bitmap System.Drawing.Bitmap The bitmap.
Résultat System

SwiftBitmap() public méthode

Initializes a new instance of the SwiftBitmap class.
public SwiftBitmap ( Image image ) : System
image Image The image.
Résultat System

SwiftBitmap() public méthode

Initializes a new instance of the SwiftBitmap class.
public SwiftBitmap ( Stream stream ) : System
stream Stream The stream.
Résultat System

SwiftBitmap() public méthode

Initializes a new instance of the SwiftBitmap class.
public SwiftBitmap ( int width, int height ) : System
width int The width.
height int The height.
Résultat System

SwiftBitmap() public méthode

Initializes a new instance of the SwiftBitmap class.
public SwiftBitmap ( string fileName ) : System
fileName string Name of the file.
Résultat System

ToString() public méthode

Converts an SwiftBitmap to a base64 string and returns it
public ToString ( ImageFormat desiredFormat ) : string
desiredFormat System.Drawing.Imaging.ImageFormat Desired SwiftBitmap format (defaults to Jpeg)
Résultat string

Unlock() public méthode

Unlocks this SwiftBitmap
public Unlock ( ) : SwiftBitmap
Résultat SwiftBitmap

operator() public static méthode

Implements the operator &.
public static operator ( ) : SwiftBitmap
Résultat SwiftBitmap