C# Класс ZBar.Image

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

Private Properties

Свойство Тип Описание
Image System
ReleaseAllocatedUnmanagedMemory void
zbar_image_convert System.IntPtr
zbar_image_convert_resize System.IntPtr
zbar_image_create System.IntPtr
zbar_image_destroy void
zbar_image_first_symbol System.IntPtr
zbar_image_free_data void
zbar_image_get_data System.IntPtr
zbar_image_get_data_length uint
zbar_image_get_format uint
zbar_image_get_height uint
zbar_image_get_sequence uint
zbar_image_get_userdata System.IntPtr
zbar_image_get_width uint
zbar_image_ref void
zbar_image_set_data void
zbar_image_set_format void
zbar_image_set_sequence void
zbar_image_set_size void
zbar_image_set_userdata void

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

Метод Описание
Convert ( uint format ) : Image

Image format conversion. refer to the documentation for supported image formats

The converted image size may be rounded (up) due to format constraints. See Image.FourCC for how to get the fourCC code.

Dispose ( ) : void

Release resources held by this object

FourCC ( char c0, char c1, char c2, char c3 ) : uint

Get FourCC code from four chars

See FourCC.org for more information on FourCC. For information on format supported by zbar see: http://sourceforge.net/apps/mediawiki/zbar/index.php?title=Supported_image_formats

Image ( ) : System

Create/allocate a new uninitialized image

Be aware that this image is NOT initialized, allocated. And you must set width, height, format, data etc...

Image ( System image ) : System

Create image from an instance of System.Drawing.Image

The converted image is in RGB3 format, so it should be converted using Image.Convert() before it is scanned, as ZBar only reads images in GREY/Y800

ToBitmap ( ) : Bitmap

Convert bitmap

Защищенные методы

Метод Описание
Dispose ( bool disposing ) : void

Dispose this object

This boolean disposing parameter here ensures that objects with a finalizer is not disposed, this is method is invoked from the finalizer. Do overwrite, and call, this method in base classes if you use any unmanaged resources.

Приватные методы

Метод Описание
Image ( IntPtr handle, bool incRef ) : System

Create a new image from a pointer to an unmanaged resource

This resource will be managed by this Image instance.

ReleaseAllocatedUnmanagedMemory ( IntPtr image ) : void
zbar_image_convert ( IntPtr image, uint format ) : IntPtr
zbar_image_convert_resize ( IntPtr image, uint format, uint width, uint height ) : IntPtr
zbar_image_create ( ) : IntPtr
zbar_image_destroy ( IntPtr image ) : void
zbar_image_first_symbol ( IntPtr image ) : IntPtr
zbar_image_free_data ( IntPtr image ) : void
zbar_image_get_data ( IntPtr image ) : IntPtr
zbar_image_get_data_length ( IntPtr img ) : uint
zbar_image_get_format ( IntPtr image ) : uint
zbar_image_get_height ( IntPtr image ) : uint
zbar_image_get_sequence ( IntPtr image ) : uint
zbar_image_get_userdata ( IntPtr image ) : IntPtr
zbar_image_get_width ( IntPtr image ) : uint
zbar_image_ref ( IntPtr image, int refs ) : void
zbar_image_set_data ( IntPtr image, IntPtr data, uint data_byte_length, zbar_image_cleanup_handler cleanup_handler ) : void
zbar_image_set_format ( IntPtr image, uint format ) : void
zbar_image_set_sequence ( IntPtr image, uint sequence_num ) : void
zbar_image_set_size ( IntPtr image, uint width, uint height ) : void
zbar_image_set_userdata ( IntPtr image, IntPtr userdata ) : void

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

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

Image format conversion. refer to the documentation for supported image formats
The converted image size may be rounded (up) due to format constraints. See Image.FourCC for how to get the fourCC code.
public Convert ( uint format ) : Image
format uint /// FourCC format to convert to. ///
Результат Image

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

Release resources held by this object
public Dispose ( ) : void
Результат void

Dispose() защищенный Метод

Dispose this object
This boolean disposing parameter here ensures that objects with a finalizer is not disposed, this is method is invoked from the finalizer. Do overwrite, and call, this method in base classes if you use any unmanaged resources.
protected Dispose ( bool disposing ) : void
disposing bool /// A False if called from the finalizer, True if called from Dispose. ///
Результат void

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

Get FourCC code from four chars
See FourCC.org for more information on FourCC. For information on format supported by zbar see: http://sourceforge.net/apps/mediawiki/zbar/index.php?title=Supported_image_formats
public static FourCC ( char c0, char c1, char c2, char c3 ) : uint
c0 char
c1 char
c2 char
c3 char
Результат uint

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

Create/allocate a new uninitialized image
Be aware that this image is NOT initialized, allocated. And you must set width, height, format, data etc...
public Image ( ) : System
Результат System

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

Create image from an instance of System.Drawing.Image
The converted image is in RGB3 format, so it should be converted using Image.Convert() before it is scanned, as ZBar only reads images in GREY/Y800
public Image ( System image ) : System
image System /// Image to convert to ZBar.Image ///
Результат System

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

Convert bitmap
public ToBitmap ( ) : Bitmap
Результат System.Drawing.Bitmap