diff --git a/admin/include/functions_upload.inc.php b/admin/include/functions_upload.inc.php index e7a2cdbfe..d8520af77 100644 --- a/admin/include/functions_upload.inc.php +++ b/admin/include/functions_upload.inc.php @@ -591,11 +591,11 @@ function upload_file_pdf($representative_ext, $file_path) prepare_directory(dirname($representative_file_path)); $exec = $conf['ext_imagick_dir'].pwg_image::get_ext_imagick_command(); + $exec.= ' "'.realpath($file_path).'"[0]'; if ('jpg' == $ext) { $exec.= ' -quality '.$jpg_quality; } - $exec.= ' "'.realpath($file_path).'"[0]'; $exec.= ' "'.$representative_file_path.'"'; $exec.= ' 2>&1'; @exec($exec, $returnarray); @@ -690,14 +690,13 @@ function upload_file_tiff($representative_ext, $file_path) prepare_directory(dirname($representative_file_path)); $exec = $conf['ext_imagick_dir'].pwg_image::get_ext_imagick_command(); + $exec .= ' "'.realpath($file_path).'"'; if ('jpg' == $conf['tiff_representative_ext']) { $exec .= ' -quality 98'; } - $exec .= ' "'.realpath($file_path).'"'; - $dest = pathinfo($representative_file_path); $exec .= ' "'.realpath($dest['dirname']).'/'.$dest['basename'].'"'; @@ -899,8 +898,8 @@ function upload_file_eps($representative_ext, $file_path) // convert -density 300 image.eps -resize 2048x2048 image.png $exec = $conf['ext_imagick_dir'].pwg_image::get_ext_imagick_command(); - $exec.= ' -density 300'; $exec.= ' "'.realpath($file_path).'"'; + $exec.= ' -density 300'; $exec.= ' -resize 2048x2048'; $exec.= ' "'.$representative_file_path.'"'; $exec.= ' 2>&1';