C# Class OSAE.OSAEImageManager

Afficher le fichier Open project: opensourceautomation/Open-Source-Automation Class Usage Examples

Méthodes publiques

Méthode Description
AddImage ( OSAEImage osaeImage ) : int

There should be No logging in the API

Adds an image to the DB

AddImage ( string name, string type, byte imageData ) : int

Adds an image to the OSAE DB

DeleteImage ( int imageId ) : void

Deletes an image from the DB

GetGIFFromFileStream ( String path ) : byte[]
GetGIFFromImageControl ( BitmapImage imageC ) : byte[]
GetImage ( int imageId ) : OSAEImage

Gets an image from the DB

GetImage ( int imageId, bool returnNullIfNotExist ) : OSAEImage

Gets an image from the DB

GetImage ( string imageName ) : OSAEImage

Gets an image from the DB

GetImageList ( ) : List

Returns a list of available images without the type or data for performence reasons.

GetImages ( ) : List

Gets all the images available in the DB

Only call this method if you have to as retrieving all images can take a short while

GetJPGFromImageControl ( BitmapImage imageC ) : byte[]
GetPNGFromImageControl ( BitmapImage imageC ) : byte[]
GifToByteArray ( Image imageIn ) : byte[]
JpgToByteArray ( Image imageIn ) : byte[]
PngToByteArray ( Image imageIn ) : byte[]

Method Details

AddImage() public méthode

There should be No logging in the API Adds an image to the DB
public AddImage ( OSAEImage osaeImage ) : int
osaeImage OSAEImage The image information to add
Résultat int

AddImage() public méthode

Adds an image to the OSAE DB
public AddImage ( string name, string type, byte imageData ) : int
name string The name of the image this should not include the path or extension
type string the type of the image e.g. jpg, png do not include the .
imageData byte the binary data of the image
Résultat int

DeleteImage() public méthode

Deletes an image from the DB
public DeleteImage ( int imageId ) : void
imageId int The Id of the image to delete
Résultat void

GetGIFFromFileStream() public méthode

public GetGIFFromFileStream ( String path ) : byte[]
path String
Résultat byte[]

GetGIFFromImageControl() public méthode

public GetGIFFromImageControl ( BitmapImage imageC ) : byte[]
imageC System.Windows.Media.Imaging.BitmapImage
Résultat byte[]

GetImage() public méthode

Gets an image from the DB
public GetImage ( int imageId ) : OSAEImage
imageId int The id of the image to get
Résultat OSAEImage

GetImage() public méthode

Gets an image from the DB
public GetImage ( int imageId, bool returnNullIfNotExist ) : OSAEImage
imageId int The id of the image to get
returnNullIfNotExist bool If the image is not found, should null be returned? Otherwise return empty image object.
Résultat OSAEImage

GetImage() public méthode

Gets an image from the DB
public GetImage ( string imageName ) : OSAEImage
imageName string
Résultat OSAEImage

GetImageList() public méthode

Returns a list of available images without the type or data for performence reasons.
public GetImageList ( ) : List
Résultat List

GetImages() public méthode

Gets all the images available in the DB
Only call this method if you have to as retrieving all images can take a short while
public GetImages ( ) : List
Résultat List

GetJPGFromImageControl() public méthode

public GetJPGFromImageControl ( BitmapImage imageC ) : byte[]
imageC System.Windows.Media.Imaging.BitmapImage
Résultat byte[]

GetPNGFromImageControl() public méthode

public GetPNGFromImageControl ( BitmapImage imageC ) : byte[]
imageC System.Windows.Media.Imaging.BitmapImage
Résultat byte[]

GifToByteArray() public méthode

public GifToByteArray ( Image imageIn ) : byte[]
imageIn Image
Résultat byte[]

JpgToByteArray() public méthode

public JpgToByteArray ( Image imageIn ) : byte[]
imageIn Image
Résultat byte[]

PngToByteArray() public méthode

public PngToByteArray ( Image imageIn ) : byte[]
imageIn Image
Résultat byte[]