Method | Description | |
---|---|---|
Crop ( this bm, bool cropX = true, bool cropY = true ) : |
Creates a cropped version of the specified Bitmap, removing transparent / empty border areas.
|
|
GetAverageColor ( this bm, bool weightTransparent = true ) : ColorRgba |
Determines the average color of a Bitmap.
|
|
GetPixelDataIntArgb ( this bm ) : int[] |
Extracts a Bitmaps pixel data as (signed) IntArgb values.
|
|
GetPixelDataRgba ( this bm ) : ColorRgba[] |
Extracts a Bitmaps pixel data.
|
|
OpaqueBounds ( this bm ) : |
Measures the bounding rectangle of the opaque pixels in a Bitmap.
|
|
Rescale ( this bm, int w, int h, InterpolationMode mode = InterpolationMode.Bilinear ) : |
Creates a rescaled version of a Bitmap.
|
|
Resize ( this bm, int w, int h, Alignment origin = Alignment.TopLeft ) : |
Creates a resized version of a Bitmap. Gained space will be empty, lost space will crop the image.
|
|
SetPixelDataIntArgb ( this bm, int pixelData ) : void |
Replaces a Bitmaps pixel data.
|
|
SetPixelDataRgba ( this bm, ColorRgba pixelData ) : void |
Replaces a Bitmaps pixel data.
|
|
SetPixelDataRgba ( this bm, byte pixelData ) : void |
Replaces a Bitmaps pixel data.
|
|
SubImage ( this bm, System.Drawing.Rect rect ) : |
Extracts a rectangular portion of the original image.
|
|
SubImage ( this bm, |
Extracts a rectangular portion of the original image.
|
|
SubImage ( this bm, int x, int y, int w, int h ) : |
Extracts a rectangular portion of the original image.
|
public static Crop ( this bm, bool cropX = true, bool cropY = true ) : |
||
bm | this | The original Bitmap. |
cropX | bool | Whether the image should be cropped in X-direction |
cropY | bool | Whether the image should be cropped in Y-direction |
return |
public static GetAverageColor ( this bm, bool weightTransparent = true ) : ColorRgba | ||
bm | this | |
weightTransparent | bool | If true, the alpha value weights a pixels color value. |
return | ColorRgba |
public static GetPixelDataIntArgb ( this bm ) : int[] | ||
bm | this | |
return | int[] |
public static GetPixelDataRgba ( this bm ) : ColorRgba[] | ||
bm | this | |
return | ColorRgba[] |
public static OpaqueBounds ( this bm ) : |
||
bm | this | |
return |
public static Rescale ( this bm, int w, int h, InterpolationMode mode = InterpolationMode.Bilinear ) : |
||
bm | this | The original Bitmap. |
w | int | The desired width. |
h | int | The desired height. |
mode | InterpolationMode | Specified how to interpolate the original image in order to calculate the result image. |
return |
public static Resize ( this bm, int w, int h, Alignment origin = Alignment.TopLeft ) : |
||
bm | this | The original Bitmap. |
w | int | The desired width. |
h | int | The desired height. |
origin | Alignment | The desired resize origin in the original image. |
return |
public static SetPixelDataIntArgb ( this bm, int pixelData ) : void | ||
bm | this | |
pixelData | int | |
return | void |
public static SetPixelDataRgba ( this bm, ColorRgba pixelData ) : void | ||
bm | this | |
pixelData | ColorRgba | |
return | void |
public static SetPixelDataRgba ( this bm, byte pixelData ) : void | ||
bm | this | |
pixelData | byte | |
return | void |
public static SubImage ( this bm, System.Drawing.Rect rect ) : |
||
bm | this | The original Bitmap. |
rect | System.Drawing.Rect | The rectangular portion to extract. |
return |
public static SubImage ( this bm, |
||
bm | this | The original Bitmap. |
rect | The rectangular portion to extract. | |
return |
public static SubImage ( this bm, int x, int y, int w, int h ) : |
||
bm | this | The original Bitmap. |
x | int | The rectangular portion to extract. |
y | int | The rectangular portion to extract. |
w | int | The rectangular portion to extract. |
h | int | The rectangular portion to extract. |
return |