Scnd has uploaded a new change for review. https://gerrit.wikimedia.org/r/133121
Change subject: Add jpeg quality option ...................................................................... Add jpeg quality option Change-Id: Ia09bdfc5d9d64f61ab08248033c5a14ed3622dea --- M PdfHandler.php M PdfHandler_body.php 2 files changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PdfHandler refs/changes/21/133121/1 diff --git a/PdfHandler.php b/PdfHandler.php index 2f25226..79a546b 100644 --- a/PdfHandler.php +++ b/PdfHandler.php @@ -45,6 +45,7 @@ $wgPdfOutputExtension = 'jpg'; $wgPdfHandlerDpi = 150; +$wgPdfHandlerJpegQuality = 80; // This setting, if enabled, will put creating thumbnails into a job queue, // so they do not have to be created on-the-fly, diff --git a/PdfHandler_body.php b/PdfHandler_body.php index 0211c85..3787221 100644 --- a/PdfHandler_body.php +++ b/PdfHandler_body.php @@ -133,7 +133,7 @@ * @return MediaTransformError|MediaTransformOutput|ThumbnailImage|TransformParameterError */ function doTransform( $image, $dstPath, $dstUrl, $params, $flags = 0 ) { - global $wgPdfProcessor, $wgPdfPostProcessor, $wgPdfHandlerDpi; + global $wgPdfProcessor, $wgPdfPostProcessor, $wgPdfHandlerDpi, $wgPdfHandlerJpegQuality; $metadata = $image->getMetadata(); @@ -200,6 +200,8 @@ $wgPdfPostProcessor, "-depth", "8", + "-quality", + $wgPdfHandlerJpegQuality, "-resize", $width, "-", -- To view, visit https://gerrit.wikimedia.org/r/133121 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia09bdfc5d9d64f61ab08248033c5a14ed3622dea Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/PdfHandler Gerrit-Branch: master Gerrit-Owner: Scnd <forwardin+34343e...@yandex.ru> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits