summaryrefslogtreecommitdiff
path: root/includes/media/DjVu.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/media/DjVu.php')
-rw-r--r--includes/media/DjVu.php20
1 files changed, 11 insertions, 9 deletions
diff --git a/includes/media/DjVu.php b/includes/media/DjVu.php
index 20e59d18..f0bbcc51 100644
--- a/includes/media/DjVu.php
+++ b/includes/media/DjVu.php
@@ -1,7 +1,11 @@
<?php
-
/**
- * @addtogroup Media
+ * @file
+ * @ingroup Media
+ */
+
+/**
+ * @ingroup Media
*/
class DjVuHandler extends ImageHandler {
function isEnabled() {
@@ -63,14 +67,14 @@ class DjVuHandler extends ImageHandler {
function doTransform( $image, $dstPath, $dstUrl, $params, $flags = 0 ) {
global $wgDjvuRenderer, $wgDjvuPostProcessor;
- // Fetch XML and check it, to give a more informative error message than the one which
+ // Fetch XML and check it, to give a more informative error message than the one which
// normaliseParams will inevitably give.
$xml = $image->getMetadata();
if ( !$xml ) {
- return new MediaTransformError( 'thumbnail_error', @$params['width'], @$params['height'],
+ return new MediaTransformError( 'thumbnail_error', @$params['width'], @$params['height'],
wfMsg( 'djvu_no_xml' ) );
}
-
+
if ( !$this->normaliseParams( $image, $params ) ) {
return new TransformParameterError( $params );
}
@@ -81,7 +85,7 @@ class DjVuHandler extends ImageHandler {
if ( $page > $this->pageCount( $image ) ) {
return new MediaTransformError( 'thumbnail_error', $width, $height, wfMsg( 'djvu_page_error' ) );
}
-
+
if ( $flags & self::TRANSFORM_LATER ) {
return new ThumbnailImage( $image, $dstUrl, $width, $height, $dstPath, $page );
}
@@ -90,7 +94,7 @@ class DjVuHandler extends ImageHandler {
return new MediaTransformError( 'thumbnail_error', $width, $height, wfMsg( 'thumbnail_dest_directory' ) );
}
- # Use a subshell (brackets) to aggregate stderr from both pipeline commands
+ # Use a subshell (brackets) to aggregate stderr from both pipeline commands
# before redirecting it to the overall stdout. This works in both Linux and Windows XP.
$cmd = '(' . wfEscapeShellArg( $wgDjvuRenderer ) . " -format=ppm -page={$page} -size={$width}x{$height} " .
wfEscapeShellArg( $srcPath );
@@ -208,5 +212,3 @@ class DjVuHandler extends ImageHandler {
}
}
}
-
-