Class ImageHelper
Image helper.
Inherited Members
Namespace: VisioForge.Core.Helpers
Assembly: VisioForge.Core.dll
Syntax
public static class ImageHelper
Methods
DrawFilledRectangle(nint, int, int, Rectangle, Color)
Draws the filled rectangle.
Declaration
public static void DrawFilledRectangle(nint data, int width, int height, Rectangle rect, Color color)
Parameters
| Type | Name | Description |
|---|---|---|
| nint | data | The data. |
| int | width | The width. |
| int | height | The height. |
| Rectangle | rect | The rectangle. |
| Color | color | The color. |
DrawRGBImage(nint, int, int, nint, int, int, int, bool, ILogger)
Draws uncompressed image.
Declaration
public static void DrawRGBImage(nint src, int srcWidth, int srcHeight, nint dest, int destWidth, int x, int y, bool draw32b, ILogger logger)
Parameters
| Type | Name | Description |
|---|---|---|
| nint | src | Source image. |
| int | srcWidth | Source width. |
| int | srcHeight | Source height. |
| nint | dest | Destination image. |
| int | destWidth | Destination width. |
| int | x | X. |
| int | y | Y. |
| bool | draw32b | True if RGB32 image used. |
| ILogger | logger | The logger. |
DrawRectangle(nint, int, int, Rectangle, int, Color)
Draws the rectangle.
Declaration
public static void DrawRectangle(nint data, int width, int height, Rectangle rect, int lineSize, Color color)
Parameters
| Type | Name | Description |
|---|---|---|
| nint | data | The data. |
| int | width | The width. |
| int | height | The height. |
| Rectangle | rect | The rectangle. |
| int | lineSize | Size of the line. |
| Color | color | The color. |
FlipRGBImage(byte[], int, int)
Flips the RGB image.
Declaration
public static byte[] FlipRGBImage(byte[] data, int width, int height)
Parameters
| Type | Name | Description |
|---|---|---|
| byte[] | data | The data. |
| int | width | The width. |
| int | height | The height. |
Returns
| Type | Description |
|---|---|
| byte[] | System.Byte[]. |
GetImageBufferSizeRGB(Bitmap)
Gets the image buffer size for RGB.
Declaration
public static int GetImageBufferSizeRGB(this Bitmap bmp)
Parameters
| Type | Name | Description |
|---|---|---|
| Bitmap | bmp | The bitmap. |
Returns
| Type | Description |
|---|---|
| int | System.Int32. |
GetStrideByPixelSize(int, byte)
Gets the stride by the pixel size.
Declaration
public static int GetStrideByPixelSize(int width, byte pixelSize)
Parameters
| Type | Name | Description |
|---|---|---|
| int | width | The width. |
| byte | pixelSize | Size of the pixel. |
Returns
| Type | Description |
|---|---|
| int | System.Int32. |
GetStrideRGB(int, PixelFormat)
Gets the stride RGB.
Declaration
public static int GetStrideRGB(int width, PixelFormat pixelFormat)
Parameters
| Type | Name | Description |
|---|---|---|
| int | width | The width. |
| PixelFormat | pixelFormat | The pixel format. |
Returns
| Type | Description |
|---|---|
| int | System.Int32. |
GetStrideRGB(int, PixelFormatX)
Gets the stride RGB.
Declaration
public static int GetStrideRGB(int width, PixelFormatX pixelFormat)
Parameters
| Type | Name | Description |
|---|---|---|
| int | width | The width. |
| PixelFormatX | pixelFormat | The pixel format. |
Returns
| Type | Description |
|---|---|
| int | System.Int32. |
GetStrideRGB24(int)
Gets the stride for RGB24.
Declaration
public static int GetStrideRGB24(int width)
Parameters
| Type | Name | Description |
|---|---|---|
| int | width | The width. |
Returns
| Type | Description |
|---|---|
| int | System.Int32. |
GetStrideRGB32(int)
Gets the stride for RGB32.
Declaration
public static int GetStrideRGB32(int width)
Parameters
| Type | Name | Description |
|---|---|---|
| int | width | The width. |
Returns
| Type | Description |
|---|---|
| int | System.Int32. |
GetStrideYUY2(int)
Gets the stride for YUY2.
Declaration
public static int GetStrideYUY2(int width)
Parameters
| Type | Name | Description |
|---|---|---|
| int | width | The width. |
Returns
| Type | Description |
|---|---|
| int | System.Int32. |
MakeCOLORREF(SKColor)
Makes the colorref.
Declaration
public static int MakeCOLORREF(SKColor color)
Parameters
| Type | Name | Description |
|---|---|---|
| SKColor | color | The color. |
Returns
| Type | Description |
|---|---|
| int | System.Int32. |
MakeCOLORREF(byte, byte, byte)
Makes the colorref.
Declaration
public static int MakeCOLORREF(byte r, byte g, byte b)
Parameters
| Type | Name | Description |
|---|---|---|
| byte | r | The r. |
| byte | g | The g. |
| byte | b | The b. |
Returns
| Type | Description |
|---|---|
| int | System.Int32. |
MakeCOLORREF(Color)
Makes the colorref.
Declaration
public static int MakeCOLORREF(Color color)
Parameters
| Type | Name | Description |
|---|---|---|
| Color | color | The color. |
Returns
| Type | Description |
|---|---|
| int | System.Int32. |
RectangleConv(RectangleF)
Converts Rectangle.
Declaration
public static Rectangle RectangleConv(this RectangleF rect)
Parameters
| Type | Name | Description |
|---|---|---|
| RectangleF | rect | The rectangle. |
Returns
| Type | Description |
|---|---|
| Rectangle | Rectangle. |