Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
IdApp.Cv.Bitmaps Class Reference

Static methods managing conversion to and from bitmap representations. More...

Static Public Member Functions

static IMatrix FromBitmapFile (string FileName)
 Loads a bitmap from a file, and returns a matrix. More...
 
static IMatrix FromBitmapFile (string FileName, int MaxWidth, int MaxHeight)
 Loads a bitmap from a file, and returns a matrix. More...
 
static IMatrix FromBitmapFile (byte[] Data)
 Loads a bitmap from a binary representation, and returns a matrix. More...
 
static IMatrix FromBitmapFile (byte[] Data, int MaxWidth, int MaxHeight)
 Loads a bitmap from a binary representation, and returns a matrix. More...
 
static IMatrix FromBitmap (SKBitmap Bmp)
 Craetes a matrix from a bitmap. More...
 
static IMatrix FromBitmap (SKBitmap Bmp, int MaxWidth, int MaxHeight)
 Craetes a matrix from a bitmap. More...
 
static void ToImageFile (IMatrix M, string FileName)
 Saves a matrix as an image to a file. More...
 
static void ToImageFile (SKImage Image, string FileName)
 Saves an image to a file. More...
 
static void ToImageFile (SKImage Image, string FileName, int Quality)
 Saves an image to a file. More...
 
static SKImage ToBitmap (IMatrix M)
 Converts a matrix to an image. More...
 
static byte[] EncodeAsPng (IMatrix M)
 Encodes an image in a matrix using PNG. More...
 

Detailed Description

Static methods managing conversion to and from bitmap representations.

Definition at line 11 of file Bitmaps.cs.

Member Function Documentation

◆ EncodeAsPng()

static byte[] IdApp.Cv.Bitmaps.EncodeAsPng ( IMatrix  M)
static

Encodes an image in a matrix using PNG.

Parameters
MMatrix
Returns
Binary PNG representation of image.

Definition at line 318 of file Bitmaps.cs.

◆ FromBitmap() [1/2]

static IMatrix IdApp.Cv.Bitmaps.FromBitmap ( SKBitmap  Bmp)
static

Craetes a matrix from a bitmap.

Parameters
BmpBitmap
Returns
Matrix

Definition at line 66 of file Bitmaps.cs.

◆ FromBitmap() [2/2]

static IMatrix IdApp.Cv.Bitmaps.FromBitmap ( SKBitmap  Bmp,
int  MaxWidth,
int  MaxHeight 
)
static

Craetes a matrix from a bitmap.

Parameters
BmpBitmap
MaxWidthMaximum width of matrix.
MaxHeightMaximum Height of matrix.
Returns
Matrix

Definition at line 78 of file Bitmaps.cs.

◆ FromBitmapFile() [1/4]

static IMatrix IdApp.Cv.Bitmaps.FromBitmapFile ( byte[]  Data)
static

Loads a bitmap from a binary representation, and returns a matrix.

Parameters
DataBinary representation of bitmap
Returns
Matrix

Definition at line 43 of file Bitmaps.cs.

◆ FromBitmapFile() [2/4]

static IMatrix IdApp.Cv.Bitmaps.FromBitmapFile ( byte[]  Data,
int  MaxWidth,
int  MaxHeight 
)
static

Loads a bitmap from a binary representation, and returns a matrix.

Parameters
DataBinary representation of bitmap
MaxWidthMaximum width of matrix.
MaxHeightMaximum Height of matrix.
Returns
Matrix

Definition at line 55 of file Bitmaps.cs.

◆ FromBitmapFile() [3/4]

static IMatrix IdApp.Cv.Bitmaps.FromBitmapFile ( string  FileName)
static

Loads a bitmap from a file, and returns a matrix.

Parameters
FileNameFile name of bitmap.
Returns
Matrix

Definition at line 18 of file Bitmaps.cs.

◆ FromBitmapFile() [4/4]

static IMatrix IdApp.Cv.Bitmaps.FromBitmapFile ( string  FileName,
int  MaxWidth,
int  MaxHeight 
)
static

Loads a bitmap from a file, and returns a matrix.

Parameters
FileNameFile name of bitmap.
MaxHeightMaximum height of loaded image. If image is larger, it will be scaled down.
MaxWidthMaximum width of loaded image. If image is larger, it will be scaled down.
Returns
Matrix

Definition at line 32 of file Bitmaps.cs.

◆ ToBitmap()

static SKImage IdApp.Cv.Bitmaps.ToBitmap ( IMatrix  M)
static

Converts a matrix to an image.

Parameters
MMatrix
Returns
Image

Definition at line 211 of file Bitmaps.cs.

◆ ToImageFile() [1/3]

static void IdApp.Cv.Bitmaps.ToImageFile ( IMatrix  M,
string  FileName 
)
static

Saves a matrix as an image to a file.

Parameters
MMatrix
FileNameFilename

Definition at line 160 of file Bitmaps.cs.

◆ ToImageFile() [2/3]

static void IdApp.Cv.Bitmaps.ToImageFile ( SKImage  Image,
string  FileName 
)
static

Saves an image to a file.

Parameters
ImageImage
FileNameFilename

Definition at line 172 of file Bitmaps.cs.

◆ ToImageFile() [3/3]

static void IdApp.Cv.Bitmaps.ToImageFile ( SKImage  Image,
string  FileName,
int  Quality 
)
static

Saves an image to a file.

Parameters
ImageImage
FileNameFilename
QualityEncoding quality.

Definition at line 183 of file Bitmaps.cs.


The documentation for this class was generated from the following file: