From 835b90122b41267476e251796c9e9d42d348e3be Mon Sep 17 00:00:00 2001 From: turon Date: Sun, 27 Sep 2015 23:18:39 -0400 Subject: add img-responsive to img tpls --- plugins/processor.magickwand.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'plugins/processor.magickwand.php') diff --git a/plugins/processor.magickwand.php b/plugins/processor.magickwand.php index 8b8cac0..0b144db 100644 --- a/plugins/processor.magickwand.php +++ b/plugins/processor.magickwand.php @@ -81,13 +81,13 @@ function liberty_magickwand_resize_image( &$pFileHash ) { $targetType = 'jpeg'; $destExt = '.jpg'; } - if( !empty( $pFileHash['max_width'] ) && !empty( $pFileHash['max_height'] ) && ( ($pFileHash['max_width'] < $iwidth || $pFileHash['max_height'] < $iheight ) || $mimeExt != $targetType ) || !empty( $pFileHash['colorspace_conversion'] ) ) { - if( !empty( $pFileHash['dest_file'] ) ) { - $destFile = $pFileHash['dest_file']; - } else { - $destFile = STORAGE_PKG_PATH.$pFileHash['dest_branch'].$pFileHash['dest_base_name'].$destExt; - } + if( !empty( $pFileHash['dest_file'] ) ) { + $destFile = $pFileHash['dest_file']; + } else { + $destFile = STORAGE_PKG_PATH.$pFileHash['dest_branch'].$pFileHash['dest_base_name'].$destExt; + } + if( !empty( $pFileHash['max_width'] ) && !empty( $pFileHash['max_height'] ) && ( ($pFileHash['max_width'] < $iwidth || $pFileHash['max_height'] < $iheight ) || $mimeExt != $targetType ) || !empty( $pFileHash['colorspace_conversion'] ) ) { $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 ) ) { @@ -98,7 +98,7 @@ function liberty_magickwand_resize_image( &$pFileHash ) { } $pFileHash['size'] = filesize( $destFile ); } else { - $destFile = liberty_process_generic( $pFileHash, FALSE ); + copy( $pFileHash['source_file'], $destFile ); } } $ret = $destFile; -- cgit v1.3