手册:$wgMaxImageArea
图片: $wgMaxImageArea | |
---|---|
如果圖像使用太多工作內存,不要縮略圖像。 |
|
引进版本: | 1.6.0 (r11398) |
移除版本: | 仍在使用 |
允许的值: | 數字(浮點數) |
默认值: | 1.25e7 |
其他设置: 按首字母排序 | 按功能排序 |
详情
This value specifies the maximum number of pixels a source image can have if it is to be scaled down by a scaler that requires the full source image to be decompressed and stored in decompressed form, before the thumbnail is generated. This provides a limit on memory usage for the decompression side of the image scaler.
The limit is used when scaling images with any of the built-in image scalers, such as ImageMagick or GD. It is ignored for JPEGs with ImageMagick, and also when using the VipsScaler extension as these situations do not cause excess memory usage.
Default is 50 MB if decompressed to RGBA form, which corresponds to 12.5 million (1.25e7
) pixels or 3500×3500.
示例代码
You have to add any of those lines of code is to be added at the end of the LocalSettings.php file found on the root of your wiki directory:
- For 25 million pixels or 5000×5000:
$wgMaxImageArea = 2.5e7;
- For 36 million pixels or 6000×6000:
$wgMaxImageArea = 3.6e7;
- For 49 million pixels or 7000×7000:
$wgMaxImageArea = 4.9e7;
- For 64 million pixels or 8000×8000:
$wgMaxImageArea = 6.4e7;
- For 72 million pixels or 9000×9000:
$wgMaxImageArea = 7.2e7;
- For 100 million pixels or 10000×10000:
$wgMaxImageArea = 10e7;