Changeset 32183 for main/trunk


Ignore:
Timestamp:
2018-05-21T10:20:27+12:00 (6 years ago)
Author:
kjdon
Message:

image height and width might be returned as 'unknown', in particular if something has gone wrong with image magick. so lets check for that so we don't get 'Argument unknown isn't numeric in numeric gt (>)' type errors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/plugins/ImageConverter.pm

    r31958 r32183  
    333333    $doc_obj->add_metadata ($section, "ImageSize",   $size_str);
    334334
    335     if ((defined $self->{'MaxImageWidth'})
     335    if ((defined $self->{'MaxImageWidth'}) && ($image_width ne "unknown")
    336336    && ($image_width > $self->{'MaxImageWidth'})) {
    337337    $self->{'MaxImageWidth'} = $image_width;
    338338    }
    339     if ((defined $self->{'MaxImageHeight'})
     339    if ((defined $self->{'MaxImageHeight'}) && ($image_height ne "unknown")
    340340    && ($image_height > $self->{'MaxImageHeight'})) {
    341341    $self->{'MaxImageHeight'} = $image_height;
Note: See TracChangeset for help on using the changeset viewer.