Changeset 19361

Show
Ignore:
Timestamp:
11.05.2009 13:01:13 (10 years ago)
Author:
mdewsnip
Message:

Removed the width=100 bit from srcicon (which is meant to be the full sized image), and added a thumbicon metadata value.

Files:
1 modified

Legend:

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

    r18320 r19361  
    112112    my ($filename_full_path, $filename_no_path) = &util::get_full_filenames($base_dir, $file); 
    113113 
    114     if ($self->{'image_conversion_available'} == 1) { 
     114    if ($self->{'image_conversion_available'} == 1) 
     115    { 
    115116    my $utf8_filename_no_path = $self->filepath_to_utf8($filename_no_path); 
    116117    my $url_encoded_filename = &util::rename_file($utf8_filename_no_path, $self->{'file_rename_method'}); 
    117118    $self->generate_images($filename_full_path, $url_encoded_filename, $doc_obj, $doc_obj->get_top_section()); # should we check the return value? 
    118     } else { 
     119    } 
     120    else 
     121    { 
    119122    if ($gli) { 
    120123        &gsprintf(STDERR, "<Warning p='ImagePlugin' r='{ImageConverter.noconversionavailable}: {ImageConverter.".$self->{'no_image_conversion_reason'}."}'>"); 
     
    128131    $doc_obj->add_metadata ($section, "srclink", "<a href=\"_httpprefix_/collect/[collection]/index/assoc/[assocfilepath]/[SourceFile]\">"); 
    129132    $doc_obj->add_metadata ($section, "/srclink", "</a>"); 
    130     $doc_obj->add_metadata ($section, "srcicon", "<img src=\"_httpprefix_/collect/[collection]/index/assoc/[assocfilepath]/[SourceFile]\" width=\"100\">"); 
     133    # We don't know the size of the image, but the browser should display it at full size 
     134    $doc_obj->add_metadata ($section, "srcicon", "<img src=\"_httpprefix_/collect/[collection]/index/assoc/[assocfilepath]/[SourceFile]\">"); 
    131135 
     136    # Add a fake thumbnail icon with the full-sized image scaled down by the browser 
     137    $doc_obj->add_metadata ($section, "thumbicon", "<img src=\"_httpprefix_/collect/[collection]/index/assoc/[assocfilepath]/[SourceFile]\" width=\"" . $self->{'thumbnailsize'} . "\">"); 
    132138    } 
    133139    #we have no text - adds dummy text and NoText metadata