directly blocked
* (bug 13710) Allow to force "watch this" checkbox via URL using para "watchthis"
* (bug 15125) Add Public Domain to default options when installing. Patch by Nathan Larson.
+* Set a special temporary directory for ImageMagick with $wgImageMagickTempDir
+
=== Bug fixes in 1.14 ===
* (bug 14907) DatabasePostgres::fieldType now defined.
/** Reduction in linear dimensions below which sharpening will be enabled */
$wgSharpenReductionThreshold = 0.85;
+/**
+ * Temporary directory used for ImageMagick. The directory must exist. Leave
+ * this set to false to let ImageMagick decide for itself.
+ */
+$wgImageMagickTempDir = false;
+
/**
* Use another resizing converter, e.g. GraphicMagick
* %s will be replaced with the source path, %d with the destination
}
function doTransform( $image, $dstPath, $dstUrl, $params, $flags = 0 ) {
- global $wgUseImageMagick, $wgImageMagickConvertCommand;
+ global $wgUseImageMagick, $wgImageMagickConvertCommand, $wgImageMagickTempDir;
global $wgCustomConvertCommand;
global $wgSharpenParameter, $wgSharpenReductionThreshold;
global $wgMaxAnimatedGifArea;
}
}
+ if ( strval( $wgImageMagickTempDir ) !== '' ) {
+ $tempEnv = 'MAGICK_TMPDIR=' . wfEscapeShellArg( $wgImageMagickTempDir ) . ' ';
+ } else {
+ $tempEnv = '';
+ }
+
# Specify white background color, will be used for transparent images
# in Internet Explorer/Windows instead of default black.
# It seems that ImageMagick has a bug wherein it produces thumbnails of
# the wrong size in the second case.
- $cmd = wfEscapeShellArg($wgImageMagickConvertCommand) .
+ $cmd =
+ $tempEnv .
+ wfEscapeShellArg($wgImageMagickConvertCommand) .
" {$quality} -background white -size {$physicalWidth} ".
wfEscapeShellArg($srcPath . $frame) .
$animation .