Changeset 3307 for trunk/gsdl/perllib/plugins/ImagePlug.pm
- Timestamp:
- 2002-08-01T03:05:38+12:00 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/plugins/ImagePlug.pm
r3137 r3307 109 109 return 0 if ($file eq "" || $filename eq ""); 110 110 111 if ($filename =~ m/ /) { 112 print $outhandle "ImagePlug: \"$filename\" contains a space. choking.\n"; 113 return undef; 114 } 111 # Code now extended to quote filenames in 'convert' commnads 112 # Allows spaces in filenames, but note needs spaces to be escaped in URL as well 113 # if ($filename =~ m/ /) { 114 # print $outhandle "ImagePlug: \"$filename\" contains a space. choking.\n"; 115 # return undef; 116 # } 115 117 116 118 my $minimumsize = $self->{'minimumsize'}; … … 131 133 $self->{'tmp_filename'} = $filename; 132 134 133 my $command = "convert - verbose $originalfilename $filename";135 my $command = "convert -interlace plane -verbose \"$originalfilename\" \"$filename\""; 134 136 print $outhandle "$command\n" if ($verbosity > 2); 135 137 my $result = ''; … … 141 143 142 144 # Add the image metadata 143 $doc_obj->add_metadata ($section, "Image", "$file"); 145 my $url = $file; 146 $url =~ s/ /%20/g; 147 148 $doc_obj->add_metadata ($section, "Image", $url); 144 149 my ($image_type, $image_width, $image_height, $image_size) 145 150 = &identify($filename, $outhandle, $verbosity); … … 160 165 161 166 # Generate the thumbnail with convert 162 my $command = "convert - verbose -geometry $thumbnailsize"163 . "x$thumbnailsize $filename $thumbnailfile";167 my $command = "convert -interlace plane -verbose -geometry $thumbnailsize" 168 . "x$thumbnailsize \"$filename\" \"$thumbnailfile\""; 164 169 print $outhandle "$command\n" if ($verbosity > 2); 165 170 my $result = ''; … … 193 198 194 199 # make the screenview image 195 my $command = "convert - verbose -geometry $screenviewsize"196 . "x$screenviewsize $filename $screenviewfilename";200 my $command = "convert -interlace plane -verbose -geometry $screenviewsize" 201 . "x$screenviewsize \"$filename\" \"$screenviewfilename\""; 197 202 print $outhandle "$command\n" if ($verbosity > 2); 198 203 my $result = ""; … … 342 347 } 343 348 349 $self->{'num_processed'}++; 350 344 351 return 1; 345 352 }
Note:
See TracChangeset
for help on using the changeset viewer.