--- ImageGalleryPlugin.pm.1 2003-07-30 19:46:16.000000000 -0700
+++ ImageGalleryPlugin.pm 2003-07-31 10:32:16.000000000 -0700
@@ -25,7 +25,7 @@
# =========================
use vars qw(
$web $topic $user $installWeb $VERSION $debug
- $CONVERT $IMAGE_MAGICK
+ $CONVERT $IMAGE_MAGICK $IDENTIFY
$exampleCfgVar
);
@@ -44,6 +44,7 @@
# Get plugin preferences, the variable defined by: * Set CONVERT = ...
$CONVERT = &TWiki::Prefs::getPreferencesValue( "IMAGEGALLERYPLUGIN_CONVERT" ) || "/usr/bin/convert";
+ $IDENTIFY = &TWiki::Prefs::getPreferencesValue( "IMAGEGALLERYPLUGIN_IDENTIFY" ) || "/usr/bin/identify";
$IMAGE_MAGICK = &TWiki::Prefs::getPreferencesValue( "IMAGEGALLERYPLUGIN_IMAGE_MAGICK" ) || "/usr/bin";
# Get plugin debug flag
@@ -75,18 +76,19 @@
foreach my $i ( @text )
{
$i->{humanReadableSize} = sprintf( "%dk", $i->{size}/1024 );
- my $fn = &TWiki::Func::getPubDir() . "/$web/$topic/$i->{path}";
- my $thumb = &TWiki::Func::getPubDir() . "/$web/$topic/thumbs/$resize/$i->{path}";
+ my $fn = &TWiki::Func::getPubDir() . "/$web/$topic/$i->{name}";
+ my $thumb = &TWiki::Func::getPubDir() . "/$web/$topic/thumbs/$resize/$i->{name}";
&TWiki::Func::writeDebug( Dumper( $i ) );
- next unless (my $dimensions = `"$IMAGE_MAGICK/identify" "$fn"`) =~
+ #next unless (my $dimensions = `"$IMAGE_MAGICK/identify" "$fn"`) =~
+ next unless (my $dimensions = `"$IDENTIFY" "$fn"`) =~
m/(\d+)x(\d+)\+(\d+)\+(\d+)/;
my ( $width, $height ) = ( $1, $2 );
my $tooltip = "$i->{humanReadableSize}" . ($i->{comment} && " : $i->{comment}" || '');
- $t .= qq(
\n)
+ $t .= qq(
\n)
;
# $t .= $i->{name} . "
\n" if &TWiki::Func::getPreferencesFlag( "IMAGEGALLERYPLUGIN_NAME" );