aboutsummaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
Diffstat (limited to 'actions')
-rw-r--r--actions/upload.php33
1 files changed, 17 insertions, 16 deletions
diff --git a/actions/upload.php b/actions/upload.php
index 65005671a..f062edc80 100644
--- a/actions/upload.php
+++ b/actions/upload.php
@@ -30,7 +30,7 @@
$image_lib = get_plugin_setting('image_lib', 'tidypics');
if (!$image_lib)
- $image_lib = 'GD';
+ $image_lib = "GD";
// post limit exceeded
if (count($_FILES) == 0) {
@@ -153,29 +153,30 @@
}
- if ($image_lib == 'GD') {
-
- if (tp_create_gd_thumbnails($file, $prefix, $filestorename) != true) {
- trigger_error('Tidypics warning: failed to create thumbnails', E_USER_WARNING);
- }
+ if ($image_lib == 'ImageMagick') { // ImageMagick command line
- } else if ($image_lib == 'ImageMagickPHP') { // ImageMagick PHP
-
- if (tp_create_imagick_thumbnails($file, $prefix, $filestorename) != true) {
- trigger_error('Tidypics warning: failed to create thumbnails', E_USER_WARNING);
- }
-
- } else { // ImageMagick command line
-
$thumbs = tp_create_imagick_cmdline_thumbnails($file, $prefix, $filestorename);
if(!count($thumbs)) {
- trigger_error('Tidypics warning: failed to create thumbnails', E_USER_WARNING);
+ trigger_error('Tidypics warning: failed to create thumbnails - ImageMagick command line', E_USER_WARNING);
}
-
+
$album = get_entity($container_guid);
tp_watermark($thumbs);
+
+ } else if ($image_lib == 'ImageMagickPHP') { // ImageMagick PHP
+
+ if (tp_create_imagick_thumbnails($file, $prefix, $filestorename) != true) {
+ trigger_error('Tidypics warning: failed to create thumbnails - ImageMagick PHP', E_USER_WARNING);
+ }
+
+ } else {
+
+ if (tp_create_gd_thumbnails($file, $prefix, $filestorename) != true) {
+ trigger_error('Tidypics warning: failed to create thumbnails - GD', E_USER_WARNING);
+ }
+
} // end of image library selector
//keep one file handy so we can add a notice to the river if single image option selected