Ignore:
Timestamp:
2009-04-19T19:31:40+12:00 (15 years ago)
Author:
davidb
Message:

MaxImageWidth and MaxImageHeight set as metadata

File:
1 edited

Legend:

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

    r19025 r19054  
    159159    return 0 if ($filename_no_path eq "" || !-f $filename_full_path);
    160160
    161     if ($self->{'cache_generated_images'}) {
     161    if ($self->{'enable_cache'}) {
    162162    $self->init_cache_for_file($filename_full_path);
    163163    }
     
    224224    $doc_obj->add_metadata ($section, "ImageHeight", $image_height);
    225225    $doc_obj->add_metadata ($section, "ImageSize",   $image_size);
     226
     227    if ((defined $self->{'MaxImageWidth'})
     228    && ($image_width > $self->{'MaxImageWidth'})) {
     229    $self->{'MaxImageWidth'} = $image_width;
     230    }
     231    if ((defined $self->{'MaxImageHeight'})
     232    && ($image_height > $self->{'MaxImageHeight'})) {
     233    $self->{'MaxImageHeight'} = $image_height;
     234    }
     235
    226236
    227237    $doc_obj->add_metadata ($section, "srclink", "<a href=\"_httpprefix_/collect/[collection]/index/assoc/$assocfilemeta/[Image]\">");
     
    335345    # Determine the full name and path of the output file
    336346    my $target_file_path;
    337     if ($self->{'cache_generated_images'}) {
     347    if ($self->{'enable_cache'}) {
    338348    my $cached_image_dir = $self->{'cached_dir'};
    339349    my $image_root = $self->{'cached_file_root'};
Note: See TracChangeset for help on using the changeset viewer.