summaryrefslogtreecommitdiff
path: root/includes/media/Jpeg.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/media/Jpeg.php')
-rw-r--r--includes/media/Jpeg.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/includes/media/Jpeg.php b/includes/media/Jpeg.php
index 8b5d6513..fa763668 100644
--- a/includes/media/Jpeg.php
+++ b/includes/media/Jpeg.php
@@ -32,7 +32,7 @@
*/
class JpegHandler extends ExifBitmapHandler {
- function getMetadata ( $image, $filename ) {
+ function getMetadata( $image, $filename ) {
try {
$meta = BitmapMetadataHandler::Jpeg( $filename );
if ( !is_array( $meta ) ) {
@@ -69,18 +69,18 @@ class JpegHandler extends ExifBitmapHandler {
public function rotate( $file, $params ) {
global $wgJpegTran;
- $rotation = ( $params[ 'rotation' ] + $this->getRotation( $file ) ) % 360;
+ $rotation = ( $params['rotation'] + $this->getRotation( $file ) ) % 360;
- if( $wgJpegTran && is_file( $wgJpegTran ) ){
+ if ( $wgJpegTran && is_file( $wgJpegTran ) ) {
$cmd = wfEscapeShellArg( $wgJpegTran ) .
" -rotate " . wfEscapeShellArg( $rotation ) .
- " -outfile " . wfEscapeShellArg( $params[ 'dstPath' ] ) .
- " " . wfEscapeShellArg( $params[ 'srcPath' ] ) . " 2>&1";
- wfDebug( __METHOD__ . ": running jpgtran: $cmd\n" );
- wfProfileIn( 'jpegtran' );
- $retval = 0;
- $err = wfShellExec( $cmd, $retval, $env );
- wfProfileOut( 'jpegtran' );
+ " -outfile " . wfEscapeShellArg( $params['dstPath'] ) .
+ " " . wfEscapeShellArg( $params['srcPath'] );
+ wfDebug( __METHOD__ . ": running jpgtran: $cmd\n" );
+ wfProfileIn( 'jpegtran' );
+ $retval = 0;
+ $err = wfShellExecWithStderr( $cmd, $retval, $env );
+ wfProfileOut( 'jpegtran' );
if ( $retval !== 0 ) {
$this->logErrorForExternalProcess( $retval, $err, $cmd );
return new MediaTransformError( 'thumbnail_error', 0, 0, $err );