FuzzyOcr 3.5.1 not seeing my images

Denis Beauchemin Denis.Beauchemin at USherbrooke.ca
Wed Apr 18 13:56:33 IST 2007


Denis Beauchemin a écrit :
> Gareth a écrit :
>>> -----Original Message-----
>>>
>>> I am experimenting with FuzzyOcr on a new server and my image spams are
>>> printing the following messages while MS is being run with debug on:
>>>
>>> [14793] dbg: FuzzyOcr: Starting FuzzyOcr...
>>> [14793] info: FuzzyOcr: Processing Message with ID
>>> "<4624E33B.7050701 at USherbrooke.ca>" (A B <A.B at USherbrooke.ca> ->
>>> A B <A.B at USherbrooke.ca>)
>>> [14793] dbg: FuzzyOcr: fname: "spam13.gif" => "spam13.gif"
>>> [14793] dbg: message: decoding base64
>>> [14793] info: FuzzyOcr: Skipping file with
>>> content-type="image/gif" name="spam13.gif"
>>> [14793] dbg: FuzzyOcr: Skipping OCR, no image files found...
>>> [14793] dbg: FuzzyOcr: Processed in 0.000415 sec.
>>>     
>>
>>
>> This is a section of the perl code that is causing the problem :-
>>
>>         my $filename = $fname; $filename =~ tr{a-zA-Z0-9\-.}{_}cs;
>>         debuglog("fname: \"$fname\" => \"$filename\"");
>>         my $pdata = $p->decode();
>>         my $pdatalen = length($pdata);
>>         my $w = 0; my $h = 0;
>>
>>         if ( substr($pdata,0,3) eq "\x47\x49\x46" ) {
>>             ## GIF File
>>             $imgfiles{$filename}{ftype} = 1;
>>             ($w,$h) = unpack("vv",substr($pdata,6,4));
>>             infolog("GIF: [${h}x${w}] $filename ($pdatalen)");
>>             $imgfiles{$filename}{width}  = $w;
>>             $imgfiles{$filename}{height} = $h;
>>
>> It is getting to the 2nd line ok but it appears that the decoded file 
>> is not
>> recognised as a valid gif file (the if command is failing).
>> The 'skipping ocr' message is triggered when there are no
>> '$imgfiles{$filename}{ftype}' being set.
>>
>>   
> Gareth,
>
> I looked at the code and added some calls to infolog() which resulted 
> in $pdatalen being 0.
> Looks like the call to decode() is either broken or the email it is 
> working with is incomplete...
>
> Denis
>
Anyone using FuzzyOcr on a RHEL5 (or CentOS 5) system?

I installed using Red Hat's RPMS when available: netpbm netpbm-devel 
netpbm-progs gtk+-devel giflib giflib-utils giflib-devel ImageMagick.  
Is there some broken RPM in there?

Thanks!

Denis

-- 
   _
  °v°   Denis Beauchemin, analyste
 /(_)\  Université de Sherbrooke, S.T.I.
  ^ ^   T: 819.821.8000x62252 F: 819.821.8045


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3595 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.mailscanner.info/pipermail/mailscanner/attachments/20070418/7c95c9ee/smime.bin


More information about the MailScanner mailing list