diff options
author | Cash Costello <cash.costello@gmail.com> | 2009-10-03 18:28:36 +0000 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2009-10-03 18:28:36 +0000 |
commit | 29da1ff8d4e70f81c401730117a832a1238399dc (patch) | |
tree | 4f507178fd473cf86f4c5a5ee1576bf99d9b685f | |
parent | 82ed7baf78c3005309487fc4e8b075cba9249e8b (diff) | |
download | elgg-29da1ff8d4e70f81c401730117a832a1238399dc.tar.gz elgg-29da1ff8d4e70f81c401730117a832a1238399dc.tar.bz2 |
cleaned up the names of ImageMagick functions
-rw-r--r-- | actions/create_thumbnails.php | 4 | ||||
-rw-r--r-- | actions/upload.php | 4 | ||||
-rw-r--r-- | lib/resize.php | 40 | ||||
-rw-r--r-- | lib/watermark.php | 2 |
4 files changed, 25 insertions, 25 deletions
diff --git a/actions/create_thumbnails.php b/actions/create_thumbnails.php index 3fefb4f0d..3869e2dcf 100644 --- a/actions/create_thumbnails.php +++ b/actions/create_thumbnails.php @@ -35,12 +35,12 @@ if ($image_lib == 'ImageMagick') { // ImageMagick command line
- if (tp_create_imagick_cmdline_thumbnails($image, $prefix, $filestorename) != true) {
+ if (tp_create_im_cmdline_thumbnails($image, $prefix, $filestorename) != true) {
trigger_error('Tidypics warning: failed to create thumbnails - ImageMagick command line', E_USER_WARNING);
echo "Failed to create thumbnails";
}
- } else if ($image_lib == 'ImageMagickPHP') { // ImageMagick PHP
+ } else if ($image_lib == 'ImageMagickPHP') { // imagick PHP extension
if (tp_create_imagick_thumbnails($image, $prefix, $filestorename) != true) {
trigger_error('Tidypics warning: failed to create thumbnails - ImageMagick PHP', E_USER_WARNING);
diff --git a/actions/upload.php b/actions/upload.php index 209d8e17d..228253ddd 100644 --- a/actions/upload.php +++ b/actions/upload.php @@ -164,11 +164,11 @@ // resize photos to create thumbnails
if ($image_lib == 'ImageMagick') { // ImageMagick command line
- if (tp_create_imagick_cmdline_thumbnails($file, $prefix, $filestorename) != true) {
+ if (tp_create_im_cmdline_thumbnails($file, $prefix, $filestorename) != true) {
trigger_error('Tidypics warning: failed to create thumbnails - ImageMagick command line', E_USER_WARNING);
}
- } else if ($image_lib == 'ImageMagickPHP') { // ImageMagick PHP
+ } else if ($image_lib == 'ImageMagickPHP') { // imagick php extension
if (tp_create_imagick_thumbnails($file, $prefix, $filestorename) != true) {
trigger_error('Tidypics warning: failed to create thumbnails - ImageMagick PHP', E_USER_WARNING);
diff --git a/lib/resize.php b/lib/resize.php index 803cb8fa7..9f4ecd4bc 100644 --- a/lib/resize.php +++ b/lib/resize.php @@ -204,7 +204,7 @@ /**
- * Create thumbnails using PHP ImageMagick Library
+ * Create thumbnails using PHP imagick extension
*
* @param ElggFile holds the image that was uploaded
* @param string folder to store thumbnail in
@@ -270,7 +270,7 @@ /**
- * Resize using PHP ImageMagick Library
+ * Resize using PHP imagick extension
*
* Writes resized version of an already uploaded image
*
@@ -382,7 +382,7 @@ * @param string name of the thumbnail
* @return bool true on success
*/
- function tp_create_imagick_cmdline_thumbnails($file, $prefix, $filestorename)
+ function tp_create_im_cmdline_thumbnails($file, $prefix, $filestorename)
{
$image_sizes = get_plugin_setting('image_sizes', 'tidypics');
if (!$image_sizes) {
@@ -397,11 +397,11 @@ // tiny thumbnail
$thumb->setFilename($prefix."thumb".$filestorename);
$thumbname = $thumb->getFilenameOnFilestore();
- $rtn_code = tp_imagick_cmdline_resize( $file->getFilenameOnFilestore(),
- $thumbname,
- $image_sizes['thumb_image_width'],
- $image_sizes['thumb_image_height'],
- true);
+ $rtn_code = tp_im_cmdline_resize( $file->getFilenameOnFilestore(),
+ $thumbname,
+ $image_sizes['thumb_image_width'],
+ $image_sizes['thumb_image_height'],
+ true);
if (!$rtn_code)
return false;
$file->thumbnail = $prefix."thumb".$filestorename;
@@ -410,11 +410,11 @@ // album thumbnail
$thumb->setFilename($prefix."smallthumb".$filestorename);
$thumbname = $thumb->getFilenameOnFilestore();
- $rtn_code = tp_imagick_cmdline_resize( $file->getFilenameOnFilestore(),
- $thumbname,
- $image_sizes['small_image_width'],
- $image_sizes['small_image_height'],
- true);
+ $rtn_code = tp_im_cmdline_resize( $file->getFilenameOnFilestore(),
+ $thumbname,
+ $image_sizes['small_image_width'],
+ $image_sizes['small_image_height'],
+ true);
if (!$rtn_code)
return false;
$file->smallthumb = $prefix."smallthumb".$filestorename;
@@ -423,17 +423,17 @@ // main image
$thumb->setFilename($prefix."largethumb".$filestorename);
$thumbname = $thumb->getFilenameOnFilestore();
- $rtn_code = tp_imagick_cmdline_resize( $file->getFilenameOnFilestore(),
- $thumbname,
- $image_sizes['large_image_width'],
- $image_sizes['large_image_height'],
- false);
+ $rtn_code = tp_im_cmdline_resize( $file->getFilenameOnFilestore(),
+ $thumbname,
+ $image_sizes['large_image_width'],
+ $image_sizes['large_image_height'],
+ false);
if (!$rtn_code)
return false;
$file->largethumb = $prefix."largethumb".$filestorename;
- tp_imagick_cmdline_watermark($thumbname);
+ tp_im_cmdline_watermark($thumbname);
@@ -453,7 +453,7 @@ * @param true|false $square If set to true, will take the smallest of maxwidth and maxheight and use it to set the dimensions on all size; the image will be cropped.
* @return bool
*/
- function tp_imagick_cmdline_resize($input_name, $output_name, $maxwidth, $maxheight, $square = false, $x1 = 0, $y1 = 0, $x2 = 0, $y2 = 0) {
+ function tp_im_cmdline_resize($input_name, $output_name, $maxwidth, $maxheight, $square = false, $x1 = 0, $y1 = 0, $x2 = 0, $y2 = 0) {
// Get the size information from the image
diff --git a/lib/watermark.php b/lib/watermark.php index e28194b18..896be72fa 100644 --- a/lib/watermark.php +++ b/lib/watermark.php @@ -90,7 +90,7 @@ function tp_imagick_watermark($filename) { return true; } -function tp_imagick_cmdline_watermark($filename) { +function tp_im_cmdline_watermark($filename) { $watermark_text = get_plugin_setting('watermark_text', 'tidypics'); if (!$watermark_text) |