Changeset 32183

Show
Ignore:
Timestamp:
21.05.2018 10:20:27 (3 months 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

Files:
1 modified

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;