Open main menu

Extension:ImageCompare

This page is a translated version of the page Extension:ImageCompare and the translation is 25% complete.

インストール

  • ダウンロードして、ファイルを extensions/ フォルダー内の ImageCompare という名前のディレクトリ内に配置します。
  • 以下のコードを LocalSettings.php の末尾に追加します:
    wfLoadExtension( 'ImageCompare' );
    
  •   完了 – ウィキの「Special:Version」に移動して、拡張機能が正しくインストールされたことを確認します。

使用法

To add two images to compare, use the <imgcomp> tag with these attributes (bold ones are required):

  • img1: The title of the image to the left ("before").
  • img2: The title of the image to the right ("after").
  • width: A number specifying the width for compared images in pixels. By default, images are added with their highest resolution.
  • mobilewidth: A number specifying the width of the images for the mobile version, also in pixels. If not specified, it will be 320 or the specified width if it is smaller.

The titles must not have the File: namespace. The inner content of the tag will be ignored.

Ideally, the two images should have the same width and height.

To compare JPEG example.jpg with PNG example.png:

<imgcomp img1='JPEG example.jpg' img2='PNG example.png' />

To compare Draft.png and Colored.png, with each image having the width of 400px:

<imgcomp img1='Draft.png' img2='Colored.png' width=400 />