c++zbar

What image formats other than "Y800" does zbar::Image::Image() accept?


The documentation for zbar::Image::Image() doesn't say anything about the accepted image formats:

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

Since format is a string, not an enum, I can't know the possible values. The only value I know is Y800 from the scan_image.cpp sample that comes with zbar:

Image image(width, height, "Y800", raw, width * height);

Are there any other possible values? Also does it matter if I've compiled it without ImageMagick support (I passed --without-imagemagick to ./configure)?

Edit: I found another possible format mentioned in an answer to another question:

By the Way : zbar Accepts "GREY" format too...


Solution

  • Digging through the library code, the supported fourcc formats depend on what video capture api you need to use:

    Surely more than you'd like to see, it is also going to depend on what the camera can supply. You'll no doubt have to make this a config setting.