Logo Search packages:      
Sourcecode: zebra version File versions  Download package

int zebra_process_image ( zebra_processor_t processor,
zebra_image_t image 
)

process the provided image for barcodes. if the library window is visible, the image will be displayed.

Returns:
>0 if symbols were successfully decoded, 0 if no symbols were found or -1 if an error occurs

Definition at line 728 of file processor.c.

References zebra_image_get_height(), zebra_image_get_width(), zebra_image_scanner_enable_cache(), and zebra_process_image().

Referenced by zebra::Processor::process_image(), and zebra_process_image().

{
    if(proc_lock(proc) < 0)
        return(-1);
    int rc = 0;
    if(img && proc->window)
        rc = _zebra_window_resize(proc,
                                  zebra_image_get_width(img),
                                  zebra_image_get_height(img));
    if(!rc) {
        zebra_image_scanner_enable_cache(proc->scanner, 0);
        rc = process_image(proc, img);
        if(proc->active)
            zebra_image_scanner_enable_cache(proc->scanner, 1);
    }
    proc_unlock(proc);
    return(rc);
}


Generated by  Doxygen 1.6.0   Back to index