C# 클래스 Utilities.Media.SwiftBitmap

Bitmap wrapper. Helps make Bitmap access faster and a bit simpler.
상속: Utilities.DataTypes.Patterns.BaseClasses.SafeDisposableBaseClass, ICloneable
파일 보기 프로젝트 열기: JaCraig/Craig-s-Utility-Library 1 사용 예제들

Private Properties

프로퍼티 타입 설명
GetImageFormat System.Drawing.Imaging.ImageFormat
GetPixelSize int

공개 메소드들

메소드 설명
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 &.

보호된 메소드들

메소드 설명
Dispose ( bool Managed ) : void

Function to override in order to dispose objects

비공개 메소드들

메소드 설명
GetImageFormat ( string fileName ) : ImageFormat

Returns the SwiftBitmap format this file is using

GetPixelSize ( ) : int

Gets the size of the pixel.

메소드 상세

ApplyColorMatrix() 공개 메소드

Applies the matrix.
public ApplyColorMatrix ( System matrix ) : SwiftBitmap
matrix System The matrix.
리턴 SwiftBitmap

ApplyColorMatrix() 공개 메소드

Applies the matrix.
public ApplyColorMatrix ( float matrix ) : SwiftBitmap
matrix float The matrix.
리턴 SwiftBitmap

ApplyConvolutionFilter() 공개 메소드

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
리턴 SwiftBitmap

Clone() 공개 메소드

Creates a new object that is a copy of the current instance.
public Clone ( ) : object
리턴 object

Copy() 공개 메소드

Copies the image from one image to this one.
public Copy ( SwiftBitmap SwiftBitmap ) : SwiftBitmap
SwiftBitmap SwiftBitmap The SwiftBitmap to copy from.
리턴 SwiftBitmap

Crop() 공개 메소드

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.
리턴 SwiftBitmap

Dispose() 보호된 메소드

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. ///
리턴 void

DrawPath() 공개 메소드

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
리턴 SwiftBitmap

DrawText() 공개 메소드

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.
리턴 SwiftBitmap

Fill() 공개 메소드

Fills the image with the specified color.
public Fill ( Color color ) : SwiftBitmap
color Color The color.
리턴 SwiftBitmap

GetPixel() 공개 메소드

Gets the pixel.
public GetPixel ( int position ) : Color
position int The position in the image
리턴 Color

GetPixel() 공개 메소드

Gets the pixel.
public GetPixel ( int x, int y ) : Color
x int The x position
y int The y position
리턴 Color

Lock() 공개 메소드

Locks this instance.
public Lock ( ) : SwiftBitmap
리턴 SwiftBitmap

Resize() 공개 메소드

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
리턴 SwiftBitmap

Rotate() 공개 메소드

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

Rotate() 공개 메소드

Rotates an image
public Rotate ( float DegreesToRotate ) : SwiftBitmap
DegreesToRotate float Degrees to rotate the image
리턴 SwiftBitmap

Save() 공개 메소드

Saves to the specified file name.
public Save ( string fileName ) : SwiftBitmap
fileName string Name of the file.
리턴 SwiftBitmap

SetPixel() 공개 메소드

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.
리턴 SwiftBitmap

SetPixels() 공개 메소드

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
리턴 SwiftBitmap

SwiftBitmap() 공개 메소드

Initializes a new instance of the SwiftBitmap class.
public SwiftBitmap ( Bitmap bitmap ) : System
bitmap System.Drawing.Bitmap The bitmap.
리턴 System

SwiftBitmap() 공개 메소드

Initializes a new instance of the SwiftBitmap class.
public SwiftBitmap ( Image image ) : System
image Image The image.
리턴 System

SwiftBitmap() 공개 메소드

Initializes a new instance of the SwiftBitmap class.
public SwiftBitmap ( Stream stream ) : System
stream Stream The stream.
리턴 System

SwiftBitmap() 공개 메소드

Initializes a new instance of the SwiftBitmap class.
public SwiftBitmap ( int width, int height ) : System
width int The width.
height int The height.
리턴 System

SwiftBitmap() 공개 메소드

Initializes a new instance of the SwiftBitmap class.
public SwiftBitmap ( string fileName ) : System
fileName string Name of the file.
리턴 System

ToString() 공개 메소드

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)
리턴 string

Unlock() 공개 메소드

Unlocks this SwiftBitmap
public Unlock ( ) : SwiftBitmap
리턴 SwiftBitmap

operator() 공개 정적인 메소드

Implements the operator &.
public static operator ( ) : SwiftBitmap
리턴 SwiftBitmap