C# Класс OSAE.OSAEImageManager

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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[]

Описание методов

AddImage() публичный Метод

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
Результат int

AddImage() публичный Метод

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
Результат int

DeleteImage() публичный Метод

Deletes an image from the DB
public DeleteImage ( int imageId ) : void
imageId int The Id of the image to delete
Результат void

GetGIFFromFileStream() публичный Метод

public GetGIFFromFileStream ( String path ) : byte[]
path String
Результат byte[]

GetGIFFromImageControl() публичный Метод

public GetGIFFromImageControl ( BitmapImage imageC ) : byte[]
imageC System.Windows.Media.Imaging.BitmapImage
Результат byte[]

GetImage() публичный Метод

Gets an image from the DB
public GetImage ( int imageId ) : OSAEImage
imageId int The id of the image to get
Результат OSAEImage

GetImage() публичный Метод

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.
Результат OSAEImage

GetImage() публичный Метод

Gets an image from the DB
public GetImage ( string imageName ) : OSAEImage
imageName string
Результат OSAEImage

GetImageList() публичный Метод

Returns a list of available images without the type or data for performence reasons.
public GetImageList ( ) : List
Результат List

GetImages() публичный Метод

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
Результат List

GetJPGFromImageControl() публичный Метод

public GetJPGFromImageControl ( BitmapImage imageC ) : byte[]
imageC System.Windows.Media.Imaging.BitmapImage
Результат byte[]

GetPNGFromImageControl() публичный Метод

public GetPNGFromImageControl ( BitmapImage imageC ) : byte[]
imageC System.Windows.Media.Imaging.BitmapImage
Результат byte[]

GifToByteArray() публичный Метод

public GifToByteArray ( Image imageIn ) : byte[]
imageIn Image
Результат byte[]

JpgToByteArray() публичный Метод

public JpgToByteArray ( Image imageIn ) : byte[]
imageIn Image
Результат byte[]

PngToByteArray() публичный Метод

public PngToByteArray ( Image imageIn ) : byte[]
imageIn Image
Результат byte[]