FuzzyOcr 3.5.1 not seeing my images

Gareth list-mailscanner at linguaphone.com
Tue Apr 17 18:04:27 IST 2007


> -----Original Message-----
> From: mailscanner-bounces at lists.mailscanner.info
> [mailto:mailscanner-bounces at lists.mailscanner.info]On Behalf Of Denis
> Beauchemin
> Sent: 17 April 2007 16:45
> To: MailScanner
> Subject: FuzzyOcr 3.5.1 not seeing my images
>
>
> Hello,
>
> 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.



More information about the MailScanner mailing list