Changeset 34

Show
Ignore:
Timestamp:
13.11.2006 16:52:20 (2 years ago)
Author:
jorge
Message:

added optional 'focr_skip_' options to skip ocr processing on the supplied image type

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/devel/FuzzyOcr.pm

    r29 r34  
    167167        if ( substr($$pic{header},0,3) eq "\x47\x49\x46" ) { 
    168168            debuglog("Found GIF header name=\"$$pic{fname}\""); 
     169            if ($conf->{focr_skip_gif}) { 
     170                debuglog("Skipping image check"); 
     171                next IMAGE; 
     172            } 
    169173            $ptype = 1; 
    170174            my $s = (stat($file))[7]; 
     
    288292        elsif ( substr($$pic{header},0,2) eq "\xff\xd8" ) { 
    289293            debuglog("Found JPEG header name=\"$$pic{fname}\""); 
     294            if ($conf->{focr_skip_jpeg}) { 
     295                debuglog("Skipping image check"); 
     296                next IMAGE; 
     297            } 
    290298            $ptype = 2; 
    291299            my $s = (stat($file))[7]; 
     
    316324        elsif ( substr($$pic{header},0,4) eq "\x89\x50\x4e\x47" ) { 
    317325            debuglog("Found PNG header name=\"$$pic{fname}\""); 
     326            if ($conf->{focr_skip_png}) { 
     327                debuglog("Skipping image check"); 
     328                next IMAGE; 
     329            } 
    318330            $ptype = 3; 
    319331            my $s = (stat($file))[7]; 
     
    345357        elsif ( substr($$pic{header},0,2) eq "BM" ) { 
    346358            debuglog("Found BMP header name=\"$$pic{fname}\""); 
     359            if ($conf->{focr_skip_bmp}) { 
     360                debuglog("Skipping image check"); 
     361                next IMAGE; 
     362            } 
    347363            $ptype = 4; 
    348364            my $s = (stat($file))[7]; 
     
    376392                ) { 
    377393            debuglog("Found TIFF header name=\"$$pic{fname}\""); 
     394            if ($conf->{focr_skip_tiff}) { 
     395                debuglog("Skipping image check"); 
     396                next IMAGE; 
     397            } 
    378398            $ptype = 5; 
    379399            my $s = (stat($file))[7];