C# Класс AForge.Imaging.Formats.Tools

Set of tools used internally in AForge.Imaging.Formats library.
Показать файл Открыть проект

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

Метод Описание
CreateGrayscaleImage ( int width, int height ) : Bitmap

Create and initialize new grayscale image.

AForge.Imaging.Image.CreateGrayscaleImage() function could be used instead, which does the some. But it was not used to get rid of dependency on AForge.Imaing library.

ReadStream ( Stream stream, byte buffer, int offset, int count ) : int

Read specified amount of bytes from the specified stream.

This tool function guarantees that requested number of bytes was read from the source stream (.NET streams don't guarantee this and may return less bytes than it was requested). Only in the case if end of stream was reached, the function may return with less bytes read.

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

CreateGrayscaleImage() публичный статический Метод

Create and initialize new grayscale image.

AForge.Imaging.Image.CreateGrayscaleImage() function could be used instead, which does the some. But it was not used to get rid of dependency on AForge.Imaing library.

public static CreateGrayscaleImage ( int width, int height ) : Bitmap
width int Image width.
height int Image height.
Результат System.Drawing.Bitmap

ReadStream() публичный статический Метод

Read specified amount of bytes from the specified stream.

This tool function guarantees that requested number of bytes was read from the source stream (.NET streams don't guarantee this and may return less bytes than it was requested). Only in the case if end of stream was reached, the function may return with less bytes read.

public static ReadStream ( Stream stream, byte buffer, int offset, int count ) : int
stream Stream Source sream to read data from.
buffer byte Buffer to read data into.
offset int Offset in buffer to put data into.
count int Number of bytes to read.
Результат int