Changeset 14951 for gsdl/trunk/perllib/plugins/ImagePlug.pm
- Timestamp:
- 2008-02-04T13:18:55+13:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/perllib/plugins/ImagePlug.pm
r14950 r14951 164 164 $self->{'tmp_filename'} = $filename; 165 165 166 my $command = "convert -interlace plane -verbose \"$originalfilename\" \"$filename\""; 167 print $outhandle "$command\n" if ($verbosity > 2); 168 my $result = ''; 169 $result = `$command`; 170 print $outhandle "RESULT = $result\n" if ($verbosity > 2); 166 my $result = $self->convert($originalfilename, $filename, "", ""); 171 167 172 168 $type = $converttotype; … … 222 218 223 219 # Generate the thumbnail with convert 224 my $command = "convert -interlace plane -verbose -geometry $thumbnailsize" 225 . "x$thumbnailsize \"$filename\" \"$thumbnailfile\""; 226 print $outhandle "THUMBNAIL: $command\n" if ($verbosity > 2); 227 my $result = ''; 228 $result = `$command 2>&1` ; 229 print $outhandle "THUMB RESULT: $result\n" if ($verbosity > 2); 220 my $result = $self->convert($filename, $thumbnailfile, "-geometry $thumbnailsize" . "x$thumbnailsize", "THUMB"); 230 221 231 222 # Add the thumbnail as an associated file ... … … 257 248 258 249 # make the screenview image 259 my $command = "convert -interlace plane -verbose -geometry $screenviewsize" 260 . "x$screenviewsize \"$filename\" \"$screenviewfilename\""; 261 print $outhandle "$command\n" if ($verbosity > 2); 262 my $result = ""; 263 $result = `$command 2>&1` ; 264 print $outhandle "$result\n" if ($verbosity > 3); 250 my $result = $self->convert($filename, $screenviewfilename, "-geometry $screenviewsize" . "x$screenviewsize", "SCREEN"); 265 251 266 252 # get screenview dimensions, size and type … … 338 324 # Return the specs 339 325 return ($type, $width, $height, $size); 326 } 327 328 329 sub convert 330 { 331 my $self = shift(@_); 332 my $source_file_path = shift(@_); 333 my $target_file_path = shift(@_); 334 my $convert_options = shift(@_) || ""; 335 my $convert_type = shift(@_) || ""; 336 337 my $outhandle = $self->{'outhandle'}; 338 my $verbosity = $self->{'verbosity'}; 339 340 my $convert_command = "convert -interlace plane -verbose $convert_options \"$source_file_path\" \"$target_file_path\""; 341 print $outhandle "$convert_type $convert_command\n" if ($verbosity > 2); 342 my $result = `$convert_command 2>&1`; 343 print $outhandle "$convert_type RESULT = $result\n" if ($verbosity > 2); 344 345 return $result; 340 346 } 341 347
Note:
See TracChangeset
for help on using the changeset viewer.