zbar::Image Class Reference

stores image data samples along with associated format and size metadata More...

Inheritance diagram for zbar::Image:

zbar::QZBarImage

List of all members.

Classes

class  Handler
 general Image result handler. More...
class  SymbolIterator

Public Member Functions

 Image (unsigned width=0, unsigned height=0, const std::string &format="", const void *data=NULL, unsigned long length=0)
 constructor.
 operator const zbar_image_t * () const
 cast to C image object
 operator zbar_image_t * ()
 cast to C image object
unsigned long get_format () const
 retrieve the image format.
void set_format (unsigned long format)
 specify the fourcc image format code for image sample data.
void set_format (const std::string &format)
 specify the fourcc image format code for image sample data.
unsigned get_sequence () const
 retrieve a "sequence" (page/frame) number associated with this image.
void set_sequence (unsigned sequence_num)
 associate a "sequence" (page/frame) number with this image.
unsigned get_width () const
 retrieve the width of the image.
unsigned get_height () const
 retrieve the height of the image.
void set_size (unsigned width, unsigned height)
 specify the pixel size of the image.
const void * get_data () const
 return the image sample data.
unsigned long get_data_length () const
 return the size of the image sample data.
void set_data (const void *data, unsigned long length)
 specify image sample data.
Image convert (unsigned long format) const
 image format conversion.
Image convert (unsigned long format, unsigned width, unsigned height) const
 image format conversion with crop/pad.
const SymbolSet get_symbols () const
void set_symbols (const SymbolSet &syms)
SymbolIterator symbol_begin () const
 create a new SymbolIterator over decoded results.
SymbolIterator symbol_end () const
 return a SymbolIterator suitable for ending iteration.

Protected Member Functions

 Image (zbar_image_t *src, int refs=0)
 constructor.

Static Protected Member Functions

static void _cleanup (zbar_image_t *img)
 default data cleanup (noop)


Detailed Description

stores image data samples along with associated format and size metadata

Constructor & Destructor Documentation

zbar::Image::Image ( unsigned  width = 0,
unsigned  height = 0,
const std::string &  format = "",
const void *  data = NULL,
unsigned long  length = 0 
) [inline]

constructor.

create a new Image with the specified parameters


Member Function Documentation

unsigned long zbar::Image::get_format (  )  const [inline]

retrieve the image format.

see zbar_image_get_format()

void zbar::Image::set_format ( unsigned long  format  )  [inline]

specify the fourcc image format code for image sample data.

see zbar_image_set_format()

void zbar::Image::set_format ( const std::string &  format  )  [inline]

specify the fourcc image format code for image sample data.

see zbar_image_set_format()

unsigned zbar::Image::get_sequence (  )  const [inline]

retrieve a "sequence" (page/frame) number associated with this image.

see zbar_image_get_sequence()

Since:
0.6

void zbar::Image::set_sequence ( unsigned  sequence_num  )  [inline]

associate a "sequence" (page/frame) number with this image.

see zbar_image_set_sequence()

Since:
0.6

unsigned zbar::Image::get_width (  )  const [inline]

retrieve the width of the image.

see zbar_image_get_width()

unsigned zbar::Image::get_height (  )  const [inline]

retrieve the height of the image.

see zbar_image_get_height()

void zbar::Image::set_size ( unsigned  width,
unsigned  height 
) [inline]

specify the pixel size of the image.

see zbar_image_set_size()

const void* zbar::Image::get_data (  )  const [inline]

return the image sample data.

see zbar_image_get_data()

unsigned long zbar::Image::get_data_length (  )  const [inline]

return the size of the image sample data.

see zbar_image_get_data_length()

Since:
0.6

void zbar::Image::set_data ( const void *  data,
unsigned long  length 
) [inline]

specify image sample data.

see zbar_image_set_data()

Image zbar::Image::convert ( unsigned long  format  )  const [inline]

image format conversion.

see zbar_image_convert()

Image zbar::Image::convert ( unsigned long  format,
unsigned  width,
unsigned  height 
) const [inline]

image format conversion with crop/pad.

see zbar_image_convert_resize()

Since:
0.4


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

SourceForge.net Logo
spadix@users.sourceforge.net

Copyright 2008-2010 (c) Jeff Brown

This documentation is part of the ZBar Barcode Reader; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.