- Timestamp:
- 2011-09-15T16:31:11+12:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/plugins/HTMLImagePlugin.pm
r21742 r24600 451 451 my ($filename, $orig_fp, $fn, $ext, $reltext, $relreltext, $crcid, $imgs, 452 452 $thumbfp, $pagetitle, $alttext, $filepath, $aggr); 453 454 my $imagick_cmd = "\"".&util::get_perl_exec()."\" -S gs-magick.pl"; 455 453 456 $aggr = $self->{'aggressiveness'}; 454 457 $imgs = \%{$self->{'imglist'}}; … … 463 466 ($fn, $ext) = $onlyfn =~ /(.*)\.(.*)/; 464 467 $fn = lc $fn; $ext = lc $ext; 465 ($reltext) = "<tr><td>GifComment</td><td>" . ` identify $filepath -ping -format "%c"` . "</td></tr>\n"468 ($reltext) = "<tr><td>GifComment</td><td>" . `$imagick_cmd identify $filepath -ping -format "%c"` . "</td></tr>\n" 466 469 if ($ext eq "gif"); 467 470 $reltext .= "<tr><td>FilePath</td><td>$orig_fp</td></tr>\n"; … … 469 472 if ($ENV{'GSDLOS'} =~ /^windows$/i) { 470 473 $crcid = "$fn.$ext." . $self->{'next_crcid'}++; 471 } else { ($crcid) = `cksum $filepath` =~ /^(\d+)/; } 474 } else { 475 ($crcid) = `cksum $filepath` =~ /^(\d+)/; 476 } 477 472 478 $thumbfp = "$tndir/tn_$crcid.jpg"; 473 ` convert -flatten -filter Hanning $self->{'convert_params'} -geometry "$self->{'thumb_size'}x$self->{'thumb_size'}>" $filepath $thumbfp` unless -e $thumbfp;479 `$imagick_cmd convert -flatten -filter Hanning $self->{'convert_params'} -geometry "$self->{'thumb_size'}x$self->{'thumb_size'}>" $filepath $thumbfp` unless -e $thumbfp; 474 480 if ( ! (-e $thumbfp) ) { 475 481 print STDERR "HTMLImagePlugin: 'convert' failed. Check ImageMagicK binaries are installed and working correctly\n"; return 0; … … 983 989 # can't modify real filepath var because it 984 990 # then can't be located in the page for tag recognition later 991 my $imagick_cmd = "\"".&util::get_perl_exec()."\" -S gs-magick.pl"; 985 992 ($width, $height) = 986 ` identify $abspath -ping -format "%wx%h"` =~ /^(\d*)x(\d*)$/m;993 `$imagick_cmd identify $abspath -ping -format "%wx%h"` =~ /^(\d*)x(\d*)$/m; 987 994 if (! ($width && $height)) { 988 995 print STDERR "HTMLImagePlugin: ($abspath) 'identify' failed. Check ImageMagicK binaries are installed and working correctly\n"; next;
Note:
See TracChangeset
for help on using the changeset viewer.