diff options
| author | turon <spider@turon> | 2015-09-27 23:18:39 -0400 |
|---|---|---|
| committer | turon <spider@turon> | 2015-09-27 23:18:39 -0400 |
| commit | 835b90122b41267476e251796c9e9d42d348e3be (patch) | |
| tree | 029c04e8f20291918c62fe0382963fe05d8cb334 /plugins/processor.magickwand.php | |
| parent | c782b17dcb2048f62d836fc2f8d0cdb83f0cb42e (diff) | |
| download | liberty-835b90122b41267476e251796c9e9d42d348e3be.tar.gz liberty-835b90122b41267476e251796c9e9d42d348e3be.tar.bz2 liberty-835b90122b41267476e251796c9e9d42d348e3be.zip | |
add img-responsive to img tpls
Diffstat (limited to 'plugins/processor.magickwand.php')
| -rw-r--r-- | plugins/processor.magickwand.php | 14 |
1 files changed, 7 insertions, 7 deletions
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; |
