Changeset 126
- Timestamp:
- 08.01.2007 01:01:47 (2 years ago)
- Files:
-
- trunk/devel/FuzzyOcr.cf (modified) (1 diff)
- trunk/devel/FuzzyOcr.pm (modified) (2 diffs)
- trunk/devel/FuzzyOcr/Config.pm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/devel/FuzzyOcr.cf
r118 r126 179 179 # ones specified here will be skipped: 180 180 # Default: Height:4 Width:4 181 # 181 182 #focr_min_height 4 182 183 #focr_min_width 4 184 185 # Maximum image size to scan. Images with dimensions bigger than the 186 # ones specified here will be skipped: 187 # Default: Height:800 Width:800 188 # 189 #focr_max_height 800 190 #focr_max_width 800 191 183 192 184 193 # Maximum file size for different formats in byte, bigger pictures trunk/devel/FuzzyOcr.pm
r123 r126 249 249 } 250 250 251 #Skip too big images, screenshots etc 252 if ($imgfiles{$filename}{height} > $conf->{focr_max_height}) { 253 infolog("Skipping image: height > $conf->{focr_max_height}"); 254 delete $imgfiles{$filename}; 255 next; 256 } 257 258 #Skip too big images, screenshots etc 259 if ($imgfiles{$filename}{width} > $conf->{focr_max_width}) { 260 infolog("Skipping image: width > $conf->{focr_max_width}"); 261 delete $imgfiles{$filename}; 262 next; 263 } 264 251 265 #Found Image!! Get a temporary dir to save image 252 266 $imgdir = Mail::SpamAssassin::Util::secure_tmpdir(); … … 782 796 debuglog("ocrdata=>>".join("",@result)."<<=end"); 783 797 foreach $modus (0 .. 1) { 798 $cmcnt = 0; 799 @cfound = (); 784 800 foreach my $ww (keys %words) { 785 801 my $w = lc $ww; trunk/devel/FuzzyOcr/Config.pm
r124 r126 204 204 setting => 'focr_min_'.$t, 205 205 default => 4, 206 type => $Mail::SpamAssassin::Conf::CONF_TYPE_NUMERIC 207 }); 208 push (@cmds, { 209 setting => 'focr_max_'.$t, 210 default => 800, 206 211 type => $Mail::SpamAssassin::Conf::CONF_TYPE_NUMERIC 207 212 });
