summaryrefslogtreecommitdiff
path: root/plugins/processor.magickwand.php
diff options
context:
space:
mode:
authorChristian Fowler <spider@viovio.com>2011-06-27 21:18:46 -0400
committerChristian Fowler <spider@viovio.com>2011-06-27 21:18:46 -0400
commit1ce0e45bf3e220a9a55b1d6b81b3025ada79018c (patch)
treea0b6c6697c6eb3fb066f6394d7b18367beb68d04 /plugins/processor.magickwand.php
parent01eed166813fd46fe291ae0b43e2050c60207b35 (diff)
downloadliberty-1ce0e45bf3e220a9a55b1d6b81b3025ada79018c.tar.gz
liberty-1ce0e45bf3e220a9a55b1d6b81b3025ada79018c.tar.bz2
liberty-1ce0e45bf3e220a9a55b1d6b81b3025ada79018c.zip
remove STORAGE_PKG_PATH from resize and convert_colorspace as dest_path comes in pre-poulated now
Diffstat (limited to 'plugins/processor.magickwand.php')
-rw-r--r--plugins/processor.magickwand.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/processor.magickwand.php b/plugins/processor.magickwand.php
index 045c35b..39a7e5b 100644
--- a/plugins/processor.magickwand.php
+++ b/plugins/processor.magickwand.php
@@ -101,8 +101,9 @@ function liberty_magickwand_resize_image( &$pFileHash ) {
if( !empty( $pFileHash['dest_file'] ) ) {
$destFile = $pFileHash['dest_file'];
} else {
- $destFile = STORAGE_PKG_PATH.'/'.$pFileHash['dest_path'].$pFileHash['dest_base_name'].$destExt;
+ $destFile = $pFileHash['dest_path'].$pFileHash['dest_base_name'].$destExt;
}
+
$pFileHash['name'] = $pFileHash['dest_base_name'].$destExt;
// Alternate Filter settings can seen here http://www.dylanbeattie.net/magick/filters/result.html
if ( $error = liberty_magickwand_check_error( MagickResizeImage( $magickWand, $pFileHash['max_width'], $pFileHash['max_height'], MW_CatromFilter, 1.00 ), $magickWand ) ) {
@@ -120,6 +121,7 @@ function liberty_magickwand_resize_image( &$pFileHash ) {
} else {
$pFileHash['error'] = "No source file to resize";
}
+
DestroyMagickWand( $magickWand );
return $ret;
}
@@ -216,7 +218,7 @@ function liberty_magickwand_convert_colorspace_image( &$pFileHash, $pColorSpace
} else {
MagickSetImageColorspace( $magickWand, MW_GRAYColorspace );
if( empty( $pFileHash['dest_file'] ) ) {
- $pFileHash['dest_file'] = STORAGE_PKG_PATH.'/'.$pFileHash['dest_path'].$pFileHash['name'];
+ $pFileHash['dest_file'] = $pFileHash['dest_path'].$pFileHash['name'];
}
if( $error = liberty_magickwand_check_error( MagickWriteImage( $magickWand, $pFileHash['dest_file'] ), $magickWand ) ) {
bit_log_error( "MagickWriteImage Failed:$error ( $pFileHash[source_file] )" );