Class ImageProcessor
Class for processing images
Inheritance
Namespace: Terminaux.Images
Assembly: Terminaux.Images.dll
Syntax
public static class ImageProcessor
Methods
| Edit this page View SourceGetColorsFromImage(MagickImage, int, int)
Gets the list of colors by the number of pixels from the image
Declaration
public static Color[,] GetColorsFromImage(MagickImage image, int width = 0, int height = 0)
Parameters
Type | Name | Description |
---|---|---|
MagickImage | image | Image data that ImageMagick can process |
int | width | Target width. Set to 0 to prevent resize. |
int | height | Target height. Set to 0 to prevent resize. |
Returns
Type | Description |
---|---|
Color[,] | A list of Terminaux's Color instance translated from ImageMagick's ImageMagick.IPixel<TQuantumType> instance |
GetColorsFromImage(byte[], int, int)
Gets the list of colors by the number of pixels from the image
Declaration
public static Color[,] GetColorsFromImage(byte[] imageBytes, int width = 0, int height = 0)
Parameters
Type | Name | Description |
---|---|---|
byte[] | imageBytes | Array of bytes that contains the image data that ImageMagick can process |
int | width | Target width. Set to 0 to prevent resize. |
int | height | Target height. Set to 0 to prevent resize. |
Returns
Type | Description |
---|---|
Color[,] | A list of Terminaux's Color instance translated from ImageMagick's ImageMagick.IPixel<TQuantumType> instance |
GetColorsFromImage(Stream, int, int)
Gets the list of colors by the number of pixels from the image
Declaration
public static Color[,] GetColorsFromImage(Stream imageStream, int width = 0, int height = 0)
Parameters
Type | Name | Description |
---|---|---|
Stream | imageStream | Stream that contains the image data that ImageMagick can process |
int | width | Target width. Set to 0 to prevent resize. |
int | height | Target height. Set to 0 to prevent resize. |
Returns
Type | Description |
---|---|
Color[,] | A list of Terminaux's Color instance translated from ImageMagick's ImageMagick.IPixel<TQuantumType> instance |
GetColorsFromImage(int, int)
Gets the list of colors by the number of pixels from the default image that Terminaux provides (that is, the Aptivi branding)
Declaration
public static Color[,] GetColorsFromImage(int width = 0, int height = 0)
Parameters
Type | Name | Description |
---|---|---|
int | width | |
int | height |
Returns
Type | Description |
---|---|
Color[,] | A list of Terminaux's Color instance translated from ImageMagick's ImageMagick.IPixel<TQuantumType> instance |
GetColorsFromImage(string, int, int)
Gets the list of colors by the number of pixels from the image
Declaration
public static Color[,] GetColorsFromImage(string imagePath, int width = 0, int height = 0)
Parameters
Type | Name | Description |
---|---|---|
string | imagePath | Path to the image that ImageMagick can process |
int | width | Target width. Set to 0 to prevent resize. |
int | height | Target height. Set to 0 to prevent resize. |
Returns
Type | Description |
---|---|
Color[,] | A list of Terminaux's Color instance translated from ImageMagick's ImageMagick.IPixel<TQuantumType> instance |
OpenImage()
Gets the list of colors by the number of pixels from the default image that Terminaux provides (that is, the Aptivi branding)
Declaration
public static MagickImage OpenImage()
Returns
Type | Description |
---|---|
MagickImage | A list of Terminaux's Color instance translated from ImageMagick's ImageMagick.IPixel<TQuantumType> instance |
OpenImage(byte[])
Gets the list of colors by the number of pixels from the image
Declaration
public static MagickImage OpenImage(byte[] imageBytes)
Parameters
Type | Name | Description |
---|---|---|
byte[] | imageBytes | Array of bytes that contains the image data that ImageMagick can process |
Returns
Type | Description |
---|---|
MagickImage | A list of Terminaux's Color instance translated from ImageMagick's ImageMagick.IPixel<TQuantumType> instance |
OpenImage(Stream)
Gets the list of colors by the number of pixels from the image
Declaration
public static MagickImage OpenImage(Stream imageStream)
Parameters
Type | Name | Description |
---|---|---|
Stream | imageStream | Stream that contains the image data that ImageMagick can process |
Returns
Type | Description |
---|---|
MagickImage | A list of Terminaux's Color instance translated from ImageMagick's ImageMagick.IPixel<TQuantumType> instance |
OpenImage(string)
Gets the list of colors by the number of pixels from the image
Declaration
public static MagickImage OpenImage(string imagePath)
Parameters
Type | Name | Description |
---|---|---|
string | imagePath | Path to the image that ImageMagick can process |
Returns
Type | Description |
---|---|
MagickImage | A list of Terminaux's Color instance translated from ImageMagick's ImageMagick.IPixel<TQuantumType> instance |
RenderImage(MagickImage, int, int, int, int, Color?, bool)
Renders the image to a string that you can print to the console
Declaration
public static string RenderImage(MagickImage image, int width, int height, int left, int top, Color? background = null, bool resize = true)
Parameters
Type | Name | Description |
---|---|---|
MagickImage | image | Image data that ImageMagick can process |
int | width | Width of the resulting image |
int | height | Height of the resulting image |
int | left | Zero-based console left position to start writing the image to |
int | top | Zero-based console top position to start writing the image to |
Color | background | Specifies the background color, or null for default |
bool | resize | Whether to perform a resize or not |
Returns
Type | Description |
---|---|
string | A string that contains the resulting pixels that you can print to the console using the WriteRaw(string, params object[]) function |
RenderImage(MagickImage, int, int, Color?, bool)
Renders the image to a string that you can print to the console
Declaration
public static string RenderImage(MagickImage image, int width, int height, Color? background = null, bool resize = true)
Parameters
Type | Name | Description |
---|---|---|
MagickImage | image | Image data that ImageMagick can process |
int | width | Width of the resulting image |
int | height | Height of the resulting image |
Color | background | Specifies the background color, or null for default |
bool | resize | Whether to perform a resize or not |
Returns
Type | Description |
---|---|
string | A string that contains the resulting pixels that you can print to the console using the WriteRaw(string, params object[]) function |
RenderImage(byte[], int, int, int, int, Color?, bool)
Renders the image to a string that you can print to the console
Declaration
public static string RenderImage(byte[] imageBytes, int width, int height, int left, int top, Color? background = null, bool resize = true)
Parameters
Type | Name | Description |
---|---|---|
byte[] | imageBytes | Array of bytes that contains the image data that ImageMagick can process |
int | width | Width of the resulting image |
int | height | Height of the resulting image |
int | left | Zero-based console left position to start writing the image to |
int | top | Zero-based console top position to start writing the image to |
Color | background | Specifies the background color, or null for default |
bool | resize | Whether to perform a resize or not |
Returns
Type | Description |
---|---|
string | A string that contains the resulting pixels that you can print to the console using the WriteRaw(string, params object[]) function |
RenderImage(byte[], int, int, Color?, bool)
Renders the image to a string that you can print to the console
Declaration
public static string RenderImage(byte[] imageBytes, int width, int height, Color? background = null, bool resize = true)
Parameters
Type | Name | Description |
---|---|---|
byte[] | imageBytes | Array of bytes that contains the image data that ImageMagick can process |
int | width | Width of the resulting image |
int | height | Height of the resulting image |
Color | background | Specifies the background color, or null for default |
bool | resize | Whether to perform a resize or not |
Returns
Type | Description |
---|---|
string | A string that contains the resulting pixels that you can print to the console using the WriteRaw(string, params object[]) function |
RenderImage(Stream, int, int, int, int, Color?, bool)
Renders the image to a string that you can print to the console
Declaration
public static string RenderImage(Stream imageStream, int width, int height, int left, int top, Color? background = null, bool resize = true)
Parameters
Type | Name | Description |
---|---|---|
Stream | imageStream | Stream that contains the image data that ImageMagick can process |
int | width | Width of the resulting image |
int | height | Height of the resulting image |
int | left | Zero-based console left position to start writing the image to |
int | top | Zero-based console top position to start writing the image to |
Color | background | Specifies the background color, or null for default |
bool | resize | Whether to perform a resize or not |
Returns
Type | Description |
---|---|
string | A string that contains the resulting pixels that you can print to the console using the WriteRaw(string, params object[]) function |
RenderImage(Stream, int, int, Color?, bool)
Renders the image to a string that you can print to the console
Declaration
public static string RenderImage(Stream imageStream, int width, int height, Color? background = null, bool resize = true)
Parameters
Type | Name | Description |
---|---|---|
Stream | imageStream | Stream that contains the image data that ImageMagick can process |
int | width | Width of the resulting image |
int | height | Height of the resulting image |
Color | background | Specifies the background color, or null for default |
bool | resize | Whether to perform a resize or not |
Returns
Type | Description |
---|---|
string | A string that contains the resulting pixels that you can print to the console using the WriteRaw(string, params object[]) function |
RenderImage(int, int, int, int, Color?, bool)
Renders the placeholder image (that is, the Aptivi branding) to a string that you can print to the console
Declaration
public static string RenderImage(int width, int height, int left, int top, Color? background = null, bool resize = true)
Parameters
Type | Name | Description |
---|---|---|
int | width | Width of the resulting image |
int | height | Height of the resulting image |
int | left | Zero-based console left position to start writing the image to |
int | top | Zero-based console top position to start writing the image to |
Color | background | Specifies the background color, or null for default |
bool | resize | Whether to perform a resize or not |
Returns
Type | Description |
---|---|
string | A string that contains the resulting pixels that you can print to the console using the WriteRaw(string, params object[]) function |
RenderImage(int, int, Color?, bool)
Renders the placeholder image (that is, the Aptivi branding) to a string that you can print to the console
Declaration
public static string RenderImage(int width, int height, Color? background = null, bool resize = true)
Parameters
Type | Name | Description |
---|---|---|
int | width | Width of the resulting image |
int | height | Height of the resulting image |
Color | background | Specifies the background color, or null for default |
bool | resize | Whether to perform a resize or not |
Returns
Type | Description |
---|---|
string | A string that contains the resulting pixels that you can print to the console using the WriteRaw(string, params object[]) function |
RenderImage(string, int, int, int, int, Color?, bool)
Renders the image to a string that you can print to the console
Declaration
public static string RenderImage(string imagePath, int width, int height, int left, int top, Color? background = null, bool resize = true)
Parameters
Type | Name | Description |
---|---|---|
string | imagePath | Path to the image that ImageMagick can process |
int | width | Width of the resulting image |
int | height | Height of the resulting image |
int | left | Zero-based console left position to start writing the image to |
int | top | Zero-based console top position to start writing the image to |
Color | background | Specifies the background color, or null for default |
bool | resize | Whether to perform a resize or not |
Returns
Type | Description |
---|---|
string | A string that contains the resulting pixels that you can print to the console using the WriteRaw(string, params object[]) function |
RenderImage(string, int, int, Color?, bool)
Renders the image to a string that you can print to the console
Declaration
public static string RenderImage(string imagePath, int width, int height, Color? background = null, bool resize = true)
Parameters
Type | Name | Description |
---|---|---|
string | imagePath | Path to the image that ImageMagick can process |
int | width | Width of the resulting image |
int | height | Height of the resulting image |
Color | background | Specifies the background color, or null for default |
bool | resize | Whether to perform a resize or not |
Returns
Type | Description |
---|---|
string | A string that contains the resulting pixels that you can print to the console using the WriteRaw(string, params object[]) function |