Changeset 35

Show
Ignore:
Timestamp:
13.11.2006 16:53:04 (2 years ago)
Author:
jorge
Message:

added optional 'focr_skip_' options to skip ocr processing on the supplied image type, and added the 'focr_max_size_' parameters to valid configuration options

Files:

Legend:

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

    r31 r35  
    4141our @paths = qw(/usr/local/netpbm/bin /usr/local/bin /usr/bin); 
    4242 
     43my @img_types = qw/gif png jpeg bmp tiff/; 
     44 
    4345# Default thresolds 
    4446$Threshold{s}  =  
     
    236238 
    237239    foreach (@bin_utils) { 
    238     push (@cmds, { 
     240        push (@cmds, { 
    239241            setting => 'focr_bin_'.$_, 
    240242            type => $Mail::SpamAssassin::Conf::CONF_TYPE_STRING 
    241243           }); 
     244    } 
     245 
     246    foreach (@img_types) { 
     247        push (@cmds, { 
     248            setting => 'focr_skip_'.$_, 
     249            default => 0, 
     250            type => $Mail::SpamAssassin::Conf::CONF_TYPE_BOOL 
     251            }); 
     252        push (@cmds, { 
     253            setting => 'focr_max_size_'.$_, 
     254            type => $Mail::SpamAssassin::Conf::CONF_TYPE_NUMERIC 
     255            }); 
    242256    } 
    243257 
     
    277291            debuglog("Using $a => ".$conf->{"focr_bin_$a"}); 
    278292        } else { 
    279         debuglog("Cannot find executable for $a"); 
     293            debuglog("Cannot find executable for $a"); 
    280294        } 
    281295    }