aboutsummaryrefslogtreecommitdiffstats
path: root/include/photos.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/photos.php')
-rw-r--r--include/photos.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/photos.php b/include/photos.php
index 9fb872700..d0c5f77fc 100644
--- a/include/photos.php
+++ b/include/photos.php
@@ -80,8 +80,8 @@ function photo_upload($channel, $observer, $args) {
if($imagick_path && @file_exists($imagick_path)) {
$tmp_name = $args['os_syspath'] . '-001';
$newsize = photo_calculate_scale(array_merge($args['getimagesize'],['max' => $max_thumb]));
- $cmd = $imagick_path . ' ' . escapeshellarg(PROJECT_BASE . '/' . $args['os_syspath']) . ' -thumbnail ' . $newsize . ' ' . escapeshellarg(PROJECT_BASE . '/' . $tmp_name);
- // logger('imagick thumbnail command: ' . $cmd);
+ $cmd = $imagick_path . ' ' . escapeshellarg(PROJECT_BASE . '/' . $args['os_syspath']) . ' -resize ' . $newsize . ' ' . escapeshellarg(PROJECT_BASE . '/' . $tmp_name);
+ logger('imagick thumbnail command: ' . $cmd);
for($x = 0; $x < 4; $x ++) {
exec($cmd);
if(file_exists($tmp_name)) {
@@ -97,7 +97,7 @@ function photo_upload($channel, $observer, $args) {
$imagedata = @file_get_contents($tmp_name);
$filesize = @filesize($args['os_syspath']);
- @unlink($tmp_name);
+// @unlink($tmp_name);
}
else {
$imagedata = @file_get_contents($args['os_syspath']);