Changeset 32192

Show
Ignore:
Timestamp:
29.05.2018 10:07:32 (3 months ago)
Author:
kjdon
Message:

with new result and result_str return values from convert, need to look at result_str not result for image dimensions

Files:
1 modified

Legend:

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

    r32184 r32192  
    407407     
    408408    # Extract Thumbnail metadata from convert output 
    409     if ($result =~ m/[0-9]+x[0-9]+=>([0-9]+)x([0-9]+)/) { 
     409    if ($result_str =~ m/[0-9]+x[0-9]+=>([0-9]+)x([0-9]+)/) { 
    410410        $doc_obj->add_metadata ($section, "ThumbWidth", $1); 
    411411        $doc_obj->add_metadata ($section, "ThumbHeight", $2); 
     
    451451 
    452452    # get screenview dimensions, size and type 
    453     if ($result =~ m/[0-9]+x[0-9]+=>([0-9]+)x([0-9]+)/) { 
     453    if ($result_str =~ m/[0-9]+x[0-9]+=>([0-9]+)x([0-9]+)/) { 
    454454        $doc_obj->add_metadata ($section, "ScreenWidth", $1); 
    455455        $doc_obj->add_metadata ($section, "ScreenHeight", $2); 
    456     } elsif ($result =~ m/([0-9]+)x([0-9]+)/) { 
     456    } elsif ($result_str =~ m/([0-9]+)x([0-9]+)/) { 
    457457        #if the image hasn't changed size, the previous regex doesn't match 
    458458        $doc_obj->add_metadata ($section, "ScreenWidth", $1);