Manual:$wgEnableAutoRotation

From MediaWiki.org
Jump to: navigation, search
This page is a translated version of the page Manual:$wgEnableAutoRotation and the translation is 33% complete.

Other languages:
English • ‎日本語 • ‎polski
Images: $wgEnableAutoRotation
Whether to enable image auto-rotation based on EXIF information
導入されたバージョン: 1.18.0 (r99910)
除去されたバージョン: 使用中
可能な値: 真偽値
既定値: true if the image rasterizer supports rotation, false otherwise
他の設定: アルファベット順 | 機能順

使用法[edit]

To explicitly disable image auto-rotation, add to the bottom of LocalSettings.php:

$wgEnableAutoRotation = false;

Explicitly setting to true is probably a bad idea (since if the image renderer supports rotation, it should be auto-detected).

詳細[edit]

If it is true, MediaWiki will look at the EXIF Orientation metadata field (which is set mainly by smartphones and some cameras, when pictures are taken sideways) and automatically rotate the image to the correct orientation.

If not set in LocalSettings.php (or if set to null) then this setting takes its value from BitmapHandler::canRotate() method - which returns true if the image rendering method supports rotation.

警告 警告: After changing this setting, if you have images that appear squished (width and height are reversed) you may have to run the maintenance script: php refreshImageMetadata.php --force --quiet

注 注: You can use ?action=purge on image pages to update scaled images (thumbnails, etc) after changing this.