aboutsummaryrefslogtreecommitdiff
path: root/actions/upload.php
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2009-06-06 22:25:14 +0000
committerCash Costello <cash.costello@gmail.com>2009-06-06 22:25:14 +0000
commit81cb128025f2b5527ac83498a97847aca8309267 (patch)
tree5ec5941ad342070782c936bcee7c295231837c5a /actions/upload.php
parent8ef053df0c982c2e2ffddc04a89b578ec36ec969 (diff)
downloadelgg-81cb128025f2b5527ac83498a97847aca8309267.tar.gz
elgg-81cb128025f2b5527ac83498a97847aca8309267.tar.bz2
added PHP ImageMagick resizing - needs more testing and determining how much memory it needs
Diffstat (limited to 'actions/upload.php')
-rw-r--r--actions/upload.php11
1 files changed, 5 insertions, 6 deletions
diff --git a/actions/upload.php b/actions/upload.php
index 11290a1d8..8f84ea929 100644
--- a/actions/upload.php
+++ b/actions/upload.php
@@ -99,16 +99,15 @@
trigger_error('Tidypics warning: image memory size too large for resizing so rejecting', E_USER_WARNING);
continue;
}
- } else if ($image_lib === 'ImageMagick') { // this will be for PHP ImageMagick
-/*
+ } else if ($image_lib === 'ImageMagickPHP') {
$mem_required = 5 * $imginfo[0] * $imginfo[1];
$mem_avail = $mem_avail - memory_get_peak_usage() - 4194304; // 4 MB buffer
if ($mem_required > $mem_avail) {
array_push($not_uploaded, $sent_file['name']);
+ array_push($error_msgs, elgg_echo('tidypics:image_pixels'));
trigger_error('Tidypics warning: image memory size too large for resizing so rejecting', E_USER_WARNING);
continue;
}
-*/
}
//this will save to users folder in /image/ and organize by photo album
@@ -141,12 +140,12 @@
trigger_error('Tidypics warning: failed to create thumbnails', E_USER_WARNING);
}
- } else if ($image_lib === 'ToDo:ImageMagick') { // ImageMagick PHP
-/*
+ } 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);