Changeset 14953
- Timestamp:
- 2008-02-04T13:54:55+13:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/perllib/plugins/ImagePlug.pm
r14952 r14953 162 162 if ($converttotype ne "" && $filename !~ m/$converttotype$/) { 163 163 $originalfilename = $filename; 164 $filename = &util::get_tmp_filename() . ".$converttotype"; 165 166 my $result = $self->convert($originalfilename, $filename, "", "");164 165 my $result = $self->convert($originalfilename, $converttotype, "", ""); 166 ($filename) = ($result =~ /=>(.*\.$converttotype)/); 167 167 168 168 $type = $converttotype; … … 214 214 my $thumbnailtype = $self->{'thumbnailtype'} || 'gif'; 215 215 216 my $thumbnailfile = &util::get_tmp_filename() . ".$thumbnailtype";217 218 216 # Generate the thumbnail with convert 219 my $result = $self->convert($filename, $thumbnailfile, "-geometry $thumbnailsize" . "x$thumbnailsize", "THUMB"); 217 my $result = $self->convert($filename, $thumbnailtype, "-geometry $thumbnailsize" . "x$thumbnailsize", "THUMB"); 218 my ($thumbnailfile) = ($result =~ /=>(.*\.$thumbnailtype)/); 220 219 221 220 # Add the thumbnail as an associated file ... … … 243 242 my $screenviewsize = $self->{'screenviewsize'}; 244 243 my $screenviewtype = $self->{'screenviewtype'} || 'jpeg'; 245 my $screenviewfilename = &util::get_tmp_filename() . ".$screenviewtype";246 244 247 245 # make the screenview image 248 my $result = $self->convert($filename, $screenviewfilename, "-geometry $screenviewsize" . "x$screenviewsize", "SCREEN"); 246 my $result = $self->convert($filename, $screenviewtype, "-geometry $screenviewsize" . "x$screenviewsize", "SCREEN"); 247 my ($screenviewfilename) = ($result =~ /=>(.*\.$screenviewtype)/); 249 248 250 249 # get screenview dimensions, size and type … … 329 328 my $self = shift(@_); 330 329 my $source_file_path = shift(@_); 331 my $target_file_ path= shift(@_);330 my $target_file_type = shift(@_); 332 331 my $convert_options = shift(@_) || ""; 333 332 my $convert_type = shift(@_) || ""; … … 336 335 my $verbosity = $self->{'verbosity'}; 337 336 337 # Determine the full name and path of the output file 338 my $target_file_path = &util::get_tmp_filename() . "." . $target_file_type; 339 push(@{$self->{'tmp_file_paths'}}, $target_file_path); 340 341 # Generate and run the convert command 338 342 my $convert_command = "convert -interlace plane -verbose $convert_options \"$source_file_path\" \"$target_file_path\""; 339 343 print $outhandle "$convert_type $convert_command\n" if ($verbosity > 2); 340 344 my $result = `$convert_command 2>&1`; 341 345 print $outhandle "$convert_type RESULT = $result\n" if ($verbosity > 2); 342 343 push(@{$self->{'tmp_file_paths'}}, $target_file_path);344 346 345 347 return $result;
Note:
See TracChangeset
for help on using the changeset viewer.