Changeset 2226


Ignore:
Timestamp:
2001-03-27T09:43:01+12:00 (23 years ago)
Author:
paynter
Message:

Image size metadata fixed, dummy text added, Image filename fixed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/plugins/ImagePlug.pm

    r2207 r2226  
    152152   
    153153    if ($result =~ m/([0-9]+)x([0-9]+)=>([0-9]+)x([0-9]+)/) {
    154     $doc_obj->add_metadata ($section, "ImageHeight", $1);
    155     $doc_obj->add_metadata ($section, "ImageWidth", $2);
    156     $doc_obj->add_metadata ($section, "ThumbHeight", $3);
    157     $doc_obj->add_metadata ($section, "ThumbWidth", $4);
     154    $doc_obj->add_metadata ($section, "ImageWidth", $1);
     155    $doc_obj->add_metadata ($section, "ImageHeight", $2);
     156    $doc_obj->add_metadata ($section, "ThumbWidth", $3);
     157    $doc_obj->add_metadata ($section, "ThumbHeight", $4);
    158158    }
    159159   
     
    186186
    187187    #if there's a leading directory name, eat it...
    188     $file =~ s/^[^\/\\]*[\/\\]//;
     188    $file =~ s/^.*[\/\\]//;
    189189   
    190190    $doc_obj->add_metadata ($section, "ImageType", $type);
     
    230230    return undef;
    231231    }
    232     print STDERR "ImagePlug: called on \"$filename\"\n"
     232    print STDERR "ImagePlug processing \"$filename\"\n"
    233233        if $self->{'verbosity'} > 1;
    234234
     
    248248
    249249    #create an empty text string so we don't break downstream plugins
    250     my $text = "";
     250    my $text = "Dummy text to sidestep display bug.";
    251251
    252252    # include any metadata passed in from previous plugins
     
    256256
    257257    # do plugin specific processing of doc_obj
    258     return undef unless defined ($self->process (\$text, $pluginfo, $base_dir, $file, $metadata, $doc_obj));
     258    return undef unless defined ($self->process (\$text, $pluginfo, $base_dir,
     259                         $file, $metadata, $doc_obj));
    259260
    260261    # do any automatic metadata extraction
     
    263264    # add an OID
    264265    $doc_obj->set_OID();
    265 
    266     # $doc_obj->add_text($section, "<pre>\n$text\n</pre>");
     266    $doc_obj->add_text($section, $text);
    267267
    268268    # process the document
Note: See TracChangeset for help on using the changeset viewer.