summaryrefslogtreecommitdiff
path: root/plugins/processor.magickwand.php
diff options
context:
space:
mode:
authorChristian Fowler <spider@viovio.com>2008-11-18 17:27:17 +0000
committerChristian Fowler <spider@viovio.com>2008-11-18 17:27:17 +0000
commit57cfbcd4f464aefa196b6636ec102d1489ed0a53 (patch)
tree4c661bc0a902995debc958d6af528e2c9ad42c20 /plugins/processor.magickwand.php
parent1cd1d3ea5d2169483af50f462770fd978cb3393d (diff)
downloadliberty-57cfbcd4f464aefa196b6636ec102d1489ed0a53.tar.gz
liberty-57cfbcd4f464aefa196b6636ec102d1489ed0a53.tar.bz2
liberty-57cfbcd4f464aefa196b6636ec102d1489ed0a53.zip
handle x-jpeg files
Diffstat (limited to 'plugins/processor.magickwand.php')
-rw-r--r--plugins/processor.magickwand.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/processor.magickwand.php b/plugins/processor.magickwand.php
index c29a7fb..a4a1e08 100644
--- a/plugins/processor.magickwand.php
+++ b/plugins/processor.magickwand.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_liberty/plugins/processor.magickwand.php,v 1.19 2008/11/07 10:57:53 nickpalmer Exp $
+ * $Header: /cvsroot/bitweaver/_bit_liberty/plugins/processor.magickwand.php,v 1.20 2008/11/18 17:27:17 spiderr Exp $
*
* Image processor - extension: php-magickwand
* @package liberty
@@ -82,10 +82,11 @@ function liberty_magickwand_resize_image( &$pFileHash ) {
list( $type, $mimeExt ) = split( '/', strtolower( $itype ));
}
- if( $mimeExt = preg_replace( "!^(x-)?(png|gif)$!", "$2", $mimeExt )) {
+ if( $mimeExt = preg_replace( "!^(x-)?(jpeg|png|gif)$!", "$2", $mimeExt )) {
$targetType = $mimeExt;
$destExt = '.'.$mimeExt;
- } else {
+ }
+ if( !$mimeExt || $mimeExt == 'jpeg' ) {
$targetType = 'jpeg';
$destExt = '.jpg';
}