aboutsummaryrefslogtreecommitdiffstats
path: root/include/photos.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-05-07 23:57:17 -0700
committerzotlabs <mike@macgirvin.com>2018-05-07 23:57:17 -0700
commit3c8de7b59d010f8273370c720aafde80067f77d7 (patch)
tree1ab495ae4b9ecf86a7da78d4ed9f4a1e93136c61 /include/photos.php
parent611e22d67641b0c82486c60d0daa59cc8e0d6b9a (diff)
downloadvolse-hubzilla-3c8de7b59d010f8273370c720aafde80067f77d7.tar.gz
volse-hubzilla-3c8de7b59d010f8273370c720aafde80067f77d7.tar.bz2
volse-hubzilla-3c8de7b59d010f8273370c720aafde80067f77d7.zip
use imagemagick first stage thumbnail for cover photos, if configured
Diffstat (limited to 'include/photos.php')
-rw-r--r--include/photos.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/photos.php b/include/photos.php
index 495043bbf..2d2c9cc13 100644
--- a/include/photos.php
+++ b/include/photos.php
@@ -84,10 +84,11 @@ function photo_upload($channel, $observer, $args) {
// logger('imagick thumbnail command: ' . $cmd);
for($x = 0; $x < 4; $x ++) {
exec($cmd);
- if(! file_exists($tmp_name)) {
- logger('imagick scale failed. Retrying.');
- continue;
+ if(file_exists($tmp_name)) {
+ break;
}
+ logger('imagick scale failed. Retrying.');
+ continue;
}
if(! file_exists($tmp_name)) {
logger('imagick scale failed. Abort.');