Craig's Utility Library
4.0 Beta
|
Bitmap wrapper. Helps make Bitmap access faster and a bit simpler. More...
Public Member Functions | |
SwiftBitmap (string fileName) | |
Initializes a new instance of the SwiftBitmap class. More... | |
SwiftBitmap (int width, int height) | |
Initializes a new instance of the SwiftBitmap class. More... | |
SwiftBitmap (Stream stream) | |
Initializes a new instance of the SwiftBitmap class. More... | |
SwiftBitmap (Image image) | |
Initializes a new instance of the SwiftBitmap class. More... | |
SwiftBitmap (Bitmap bitmap) | |
Initializes a new instance of the SwiftBitmap class. More... | |
SwiftBitmap | ApplyColorMatrix (System.Drawing.Imaging.ColorMatrix matrix) |
Applies the matrix. More... | |
SwiftBitmap | ApplyColorMatrix (float[][] matrix) |
Applies the matrix. More... | |
SwiftBitmap | ApplyConvolutionFilter (int[][] filter, bool absolute=false, int offset=0) |
Applies the convolution filter to the image More... | |
object | Clone () |
Creates a new object that is a copy of the current instance. More... | |
unsafe SwiftBitmap | Copy (SwiftBitmap SwiftBitmap) |
Copies the image from one image to this one. More... | |
SwiftBitmap | Crop (int Width, int Height, Align VAlignment, Align HAlignment) |
Crops the image by the specified width/height More... | |
SwiftBitmap | DrawPath (Pen pen, GraphicsPath path) |
Draws the path specified More... | |
SwiftBitmap | DrawText (string TextToDraw, Font FontToUse, Brush BrushUsing, RectangleF BoxToDrawWithin) |
Draws the text specified More... | |
SwiftBitmap | Fill (Color color) |
Fills the image with the specified color. More... | |
unsafe Color | GetPixel (int x, int y) |
Gets the pixel. More... | |
unsafe Color | GetPixel (int position) |
Gets the pixel. More... | |
unsafe SwiftBitmap | Lock () |
Locks this instance. More... | |
SwiftBitmap | Resize (int Width, int Height, Quality Quality=Quality.Low) |
Resizes an SwiftBitmap to a certain height More... | |
SwiftBitmap | Rotate (RotateFlipType flipType) |
Rotates and/or flips the image More... | |
SwiftBitmap | Rotate (float DegreesToRotate) |
Rotates an image More... | |
SwiftBitmap | Save (string fileName) |
Saves to the specified file name. More... | |
unsafe SwiftBitmap | SetPixel (int x, int y, Color pixelColor) |
Sets the pixel. More... | |
unsafe SwiftBitmap | SetPixels (int x, int y, Color[] pixels) |
Sets the pixels starting at the x and y coordinate specified. More... | |
string | ToString (ImageFormat desiredFormat) |
Converts an SwiftBitmap to a base64 string and returns it More... | |
unsafe SwiftBitmap | Unlock () |
Unlocks this SwiftBitmap More... | |
Public Member Functions inherited from Utilities.DataTypes.Patterns.BaseClasses.SafeDisposableBaseClass | |
void | Dispose () |
Dispose function More... | |
Static Public Member Functions | |
static SwiftBitmap | operator& (SwiftBitmap Image1, SwiftBitmap Image2) |
Implements the operator &. More... | |
static SwiftBitmap | operator^ (SwiftBitmap Image1, SwiftBitmap Image2) |
Implements the operator ^. More... | |
static SwiftBitmap | operator| (SwiftBitmap Image1, SwiftBitmap Image2) |
Implements the operator |. More... | |
Protected Member Functions | |
override void | Dispose (bool Managed) |
Function to override in order to dispose objects More... | |
Protected Member Functions inherited from Utilities.DataTypes.Patterns.BaseClasses.SafeDisposableBaseClass | |
SafeDisposableBaseClass () | |
Construct More... | |
Properties | |
int | Height [get] |
Gets or sets the height. More... | |
IEnumerable< string > | HTMLPalette [get] |
Gets a palette listing in HTML string format More... | |
Bitmap | InternalBitmap [get] |
Gets the internal Bitmap. More... | |
int | Width [get] |
Gets or sets the width. More... | |
BitmapData | Data [get] |
Gets the data. More... | |
unsafe byte * | DataPointer [get] |
Gets the data pointer. More... | |
int | PixelSize [get] |
Gets the pixel size (in bytes) More... | |
Bitmap wrapper. Helps make Bitmap access faster and a bit simpler.
Definition at line 40 of file SwiftBitmap.cs.
Utilities.Media.SwiftBitmap.SwiftBitmap | ( | string | fileName | ) |
Initializes a new instance of the SwiftBitmap class.
fileName | Name of the file. |
Definition at line 46 of file SwiftBitmap.cs.
Utilities.Media.SwiftBitmap.SwiftBitmap | ( | int | width, |
int | height | ||
) |
Initializes a new instance of the SwiftBitmap class.
width | The width. |
height | The height. |
Definition at line 57 of file SwiftBitmap.cs.
Utilities.Media.SwiftBitmap.SwiftBitmap | ( | Stream | stream | ) |
Initializes a new instance of the SwiftBitmap class.
stream | The stream. |
Definition at line 66 of file SwiftBitmap.cs.
Utilities.Media.SwiftBitmap.SwiftBitmap | ( | Image | image | ) |
Initializes a new instance of the SwiftBitmap class.
image | The image. |
Definition at line 76 of file SwiftBitmap.cs.
Utilities.Media.SwiftBitmap.SwiftBitmap | ( | Bitmap | bitmap | ) |
Initializes a new instance of the SwiftBitmap class.
bitmap | The bitmap. |
Definition at line 86 of file SwiftBitmap.cs.
SwiftBitmap Utilities.Media.SwiftBitmap.ApplyColorMatrix | ( | System.Drawing.Imaging.ColorMatrix | matrix | ) |
Applies the matrix.
matrix | The matrix. |
Definition at line 263 of file SwiftBitmap.cs.
SwiftBitmap Utilities.Media.SwiftBitmap.ApplyColorMatrix | ( | float | matrix[][] | ) |
Applies the matrix.
matrix | The matrix. |
Definition at line 288 of file SwiftBitmap.cs.
SwiftBitmap Utilities.Media.SwiftBitmap.ApplyConvolutionFilter | ( | int | filter[][], |
bool | absolute = false , |
||
int | offset = 0 |
||
) |
Applies the convolution filter to the image
filter | The filter. |
absolute | if set to true then the absolute value is used |
offset | The offset to use for each pixel |
Definition at line 302 of file SwiftBitmap.cs.
object Utilities.Media.SwiftBitmap.Clone | ( | ) |
Creates a new object that is a copy of the current instance.
Definition at line 370 of file SwiftBitmap.cs.
unsafe SwiftBitmap Utilities.Media.SwiftBitmap.Copy | ( | SwiftBitmap | SwiftBitmap | ) |
Copies the image from one image to this one.
SwiftBitmap | The SwiftBitmap to copy from. |
Definition at line 381 of file SwiftBitmap.cs.
SwiftBitmap Utilities.Media.SwiftBitmap.Crop | ( | int | Width, |
int | Height, | ||
Align | VAlignment, | ||
Align | HAlignment | ||
) |
Crops the image by the specified width/height
Width | The width. |
Height | The height. |
VAlignment | The v alignment. |
HAlignment | The h alignment. |
Definition at line 400 of file SwiftBitmap.cs.
|
protectedvirtual |
Function to override in order to dispose objects
Managed | If true, managed and unmanaged objects should be disposed. Otherwise unmanaged objects only. |
Implements Utilities.DataTypes.Patterns.BaseClasses.SafeDisposableBaseClass.
Definition at line 702 of file SwiftBitmap.cs.
SwiftBitmap Utilities.Media.SwiftBitmap.DrawPath | ( | Pen | pen, |
GraphicsPath | path | ||
) |
Draws the path specified
pen | The pen to use. |
path | The path to draw |
Definition at line 427 of file SwiftBitmap.cs.
SwiftBitmap Utilities.Media.SwiftBitmap.DrawText | ( | string | TextToDraw, |
Font | FontToUse, | ||
Brush | BrushUsing, | ||
RectangleF | BoxToDrawWithin | ||
) |
Draws the text specified
TextToDraw | The text to draw. |
FontToUse | The font to use. |
BrushUsing | The brush to use. |
BoxToDrawWithin | The box to draw within. |
Definition at line 448 of file SwiftBitmap.cs.
SwiftBitmap Utilities.Media.SwiftBitmap.Fill | ( | Color | color | ) |
Fills the image with the specified color.
color | The color. |
Definition at line 467 of file SwiftBitmap.cs.
unsafe Color Utilities.Media.SwiftBitmap.GetPixel | ( | int | x, |
int | y | ||
) |
Gets the pixel.
x | The x position |
y | The y position |
Definition at line 480 of file SwiftBitmap.cs.
unsafe Color Utilities.Media.SwiftBitmap.GetPixel | ( | int | position | ) |
Gets the pixel.
position | The position in the image |
Definition at line 494 of file SwiftBitmap.cs.
unsafe SwiftBitmap Utilities.Media.SwiftBitmap.Lock | ( | ) |
|
static |
Implements the operator &.
Image1 | The first image. |
Image2 | The second image |
Definition at line 171 of file SwiftBitmap.cs.
|
static |
Implements the operator ^.
Image1 | The first image. |
Image2 | The second image |
Definition at line 202 of file SwiftBitmap.cs.
|
static |
Implements the operator |.
Image1 | The first image. |
Image2 | The second image |
Definition at line 233 of file SwiftBitmap.cs.
SwiftBitmap Utilities.Media.SwiftBitmap.Resize | ( | int | Width, |
int | Height, | ||
Quality | Quality = Quality.Low |
||
) |
Resizes an SwiftBitmap to a certain height
Width | New width for the final image |
Height | New height for the final image |
Quality | Quality of the resizing |
Definition at line 527 of file SwiftBitmap.cs.
SwiftBitmap Utilities.Media.SwiftBitmap.Rotate | ( | RotateFlipType | flipType | ) |
Rotates and/or flips the image
flipType | Type of flip/rotation to do |
Definition at line 560 of file SwiftBitmap.cs.
SwiftBitmap Utilities.Media.SwiftBitmap.Rotate | ( | float | DegreesToRotate | ) |
Rotates an image
DegreesToRotate | Degrees to rotate the image |
Definition at line 573 of file SwiftBitmap.cs.
SwiftBitmap Utilities.Media.SwiftBitmap.Save | ( | string | fileName | ) |
Saves to the specified file name.
fileName | Name of the file. |
Definition at line 598 of file SwiftBitmap.cs.
unsafe SwiftBitmap Utilities.Media.SwiftBitmap.SetPixel | ( | int | x, |
int | y, | ||
Color | pixelColor | ||
) |
Sets the pixel.
x | The x position |
y | The y position |
pixelColor | Color of the pixel. |
Definition at line 614 of file SwiftBitmap.cs.
unsafe SwiftBitmap Utilities.Media.SwiftBitmap.SetPixels | ( | int | x, |
int | y, | ||
Color[] | pixels | ||
) |
Sets the pixels starting at the x and y coordinate specified.
x | The beginning x coordinate |
y | The beginning y coordinate |
pixels | The pixels to set |
Definition at line 639 of file SwiftBitmap.cs.
string Utilities.Media.SwiftBitmap.ToString | ( | ImageFormat | desiredFormat | ) |
Converts an SwiftBitmap to a base64 string and returns it
desiredFormat | Desired SwiftBitmap format (defaults to Jpeg) |
Definition at line 670 of file SwiftBitmap.cs.
unsafe SwiftBitmap Utilities.Media.SwiftBitmap.Unlock | ( | ) |
|
getprotected |
|
getprotected |
|
get |
|
get |
Gets a palette listing in HTML string format
A list containing HTML color values (ex: #041845)
Definition at line 105 of file SwiftBitmap.cs.
|
get |
|
getprotected |
Gets the pixel size (in bytes)
The size of the pixel.
Definition at line 161 of file SwiftBitmap.cs.
|
get |