Extension:VipsScaler
![]() | Lütfen bu sayfayı genişletin. |
![]() Sürüm durumu: kararlı |
|
---|---|
![]() |
|
Uygulama | Medya |
Açıklama | PNG ve JPEG görüntülerini VIPS kullanarak ölçeklendirmeye izin verir |
Yazar(lar) | Bryan Tong Minh (Bryanmesaj) |
MediaWiki | 1.19+ |
Veritabanı değişiklikleri | Hayır |
Lisans | GNU Genel Kamu Lisansı 2.0 veya üstü |
İndir | README |
|
|
Quarterly downloads | 19 (Ranked 141st) |
Public wikis using | 1,811 (Ranked 203rd) |
Translatewiki.net adresinde mevcutsa, VipsScaler uzantısını çevirin | |
Sorunlar | Açık görevler · Hata bildir |
The VipsScaler extension is a wrapper around VIPS, a free image processing software. VIPS is a set of image manipulation tools specially designed for speed and low memory usage. This is useful for resizing large PNGs, and it improves the appearance of shrunken JPEGs.
The extension shells out to the vips binary. It can be configured to scale only certain files (for example: big PNGs) by configuring $wgVipsOptions.
VIPS kurulumu
Install VIPS
Install VIPS. It can be downloaded from https://libvips.github.io/libvips or your OS repository (see below).
Debian / Ubuntu
$ apt-get install libvips-tools
If you want to build from source have a look at upstream documentation: https://libvips.github.io/libvips/install.html
(Wikimedia has packaged and uses a more recent version for Ubuntu 12.04 at apt.wikimedia.org)
Mac OS X
- homebrew
- brew install homebrew/science/vips
- binary symlink is /usr/local/bin/vips
Install VipsScaler extension
- Install VIPS (see above)
- Dosyaları indirin ve
extensions/
klasörünüzdekiVipsScaler
adlı dizine yerleştirin. - LocalSettings.php dosyanızın altına aşağıdaki kodu ekleyin:
wfLoadExtension( 'VipsScaler' );
- Navigate to Special:VipsTest to verify it is working and see the difference in output quality.
Yapıldı – Uzantının başarıyla yüklendiğini doğrulamak için vikinizde Special:Version seçeneğine gidin.
Yapılandırma
- $wgVipsCommand
- path to the vips command (default: vips).
- $wgVipsOptions
- Options and conditions for images to be scaled with this scaler. Set to an array of arrays. The inner array contains a condition array, which contains a list of conditions that the image should pass for it to be scaled with vips. Conditions are mimeType, minArea, maxArea, minShrinkFactor, maxShrinkFactor. The other items in the array are options. Options available are:
- sharpen - Set to an array with keys 'radius' and 'sigma', which are parameters to gaussian sharpen matrix.
- preconvert - Convert the file to a .v file first, which costs some space, but saves memory on the actual downsize
- bilinear - Use im_resize_linear instead of im_shrink
- convolution - Apply specified convolution matrix
- setcomment - Add an exif comment specifying the source of the file. Requires $wgExiv2Command to be set properly.
$wgVipsOptions = [
// Sharpen jpeg files which are shrunk more than 1.2
[
'conditions' => [
'mimeType' => 'image/jpeg',
'minShrinkFactor' => 1.2,
],
'sharpen' => [ 'radius' => 0, 'sigma' => 0.8 ],
],
// Other jpeg files
[
'conditions' =>[
'mimeType' => 'image/jpeg',
],
'sharpen' => false,
'bilinear' => true,
],
// Do a simple shrink for PNGs
[
'conditions' => [
'mimeType' => 'image/png',
],
],
];
![]() | Bu uzantı bir veya daha fazla Wikimedia projelerinde kullanılıyor. Bu, muhtemelen uzantının kararlı olduğu ve bu tür yüksek trafikli web siteleri tarafından kullanılacak kadar iyi çalıştığı anlamına gelir. Nerede kurulduğunu görmek için bu uzantının adını Wikimedia'nın CommonSettings.php ve InitialiseSettings.php yapılandırma dosyalarında arayın. Belirli bir vikide yüklü olan uzantılar listesinin tamamı vikinin Special:Version sayfasında görülebilir. |