FuzzyOcr 3.5.1 not seeing my images
James
lists at jfworks.net
Wed Apr 18 22:30:34 IST 2007
Denis Beauchemin wrote:
> 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
>
I just installed this on a CentOS 4.4 box and it seemed to work ok, did
it work on 4.4 but not 5.0 ? I wont have a 5.0 box to test with for a
couple days.
James
More information about the MailScanner
mailing list