- Timestamp:
- 2018-05-21T12:10:36+12:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/plugins/ImageConverter.pm
r32183 r32184 263 263 if ($converttotype ne "" && $filename_full_path !~ m/$converttotype$/) { 264 264 # # $doc_obj->add_utf8_metadata($section, "Image", $utf8_filename_meta); 265 my ($result, $ converted_filename_full_path)265 my ($result, $result_str, $converted_filename_full_path) 266 266 = $self->convert($filename_full_path, $converttotype, "", "CONVERTTYPE"); 267 267 268 if (!defined $result || $result == 0) { 269 # conversion error 270 print $outhandle "ImageConverter:convert error\n"; 271 print $outhandle "$@\n"; 272 if (defined $result_str) { 273 print $outhandle "$result_str\n"; 274 } 275 return 0; 276 } 277 268 278 $type = $converttotype; 269 279 $filename_full_path = $converted_filename_full_path; … … 383 393 384 394 # Generate the thumbnail with convert 385 my ($result, $thumbnailfile)395 my ($result, $result_str,$thumbnailfile) 386 396 = $self->convert($original_file, $thumbnailtype, "-geometry $thumbnailsize" . "x$thumbnailsize", "THUMB"); 387 397 … … 429 439 430 440 # make the screenview image 431 my ($result,$ screenviewfilename)441 my ($result,$result_str, $screenviewfilename) 432 442 = $self->convert($original_file, $screenviewtype, $scale_option, "SCREEN"); 433 443 … … 507 517 = $self->autorun_general_cmd($convert_command,$source_file_path,$target_file_path,$print_info); 508 518 509 return ($result,$target_file_path); 519 if ($had_error) { 520 return (0, $result, $target_file_path); 521 } 522 523 return (1, $result,$target_file_path); 510 524 } 511 525
Note:
See TracChangeset
for help on using the changeset viewer.