Commons:Media for cleanup/zh

Shortcut: COM:MFC

维基共享资源的图片质量良莠不齐。诚然,诸如拍摄角度不佳、失焦模糊等等的问题我们没法修复,但许多图片可以在事後透過數位編輯修復。本页面描述几种常见图片问题、修复手法、与经典案例。

需要清理的图片都应该划归到Category:Images for cleanup和其子分类中。如果见到一张需要改进的图片但又不清楚怎么分类,请把{{Cleanup image|理由}}加到图片的描述页,将其标记为需要清理。

可移除多余内容的图片

不必要的边框

有的图片不必要的边框,这些边框可以被移除。比如:

  • 有的图片边框带有图片标题或其他文字描述。这些文字应放在文件的描述页上,以便其他编辑翻译。(不过要注意这条规则「不」一定永远成立,有些印刷艺术作品中的文字是該類型艺术作品外觀和感覺的固有部份)
  • 影像側邊多餘的「補白」,尤其是從印刷作品掃描的影像。不過,請注意,在某些情況下,當圖像不完全是長方形、但幾乎是長方形時,留下較厚的邊框可以提供較佳的視覺效果,因為裁剪得較近時,會將不規則的部份放在裁剪的完美長方形邊框附近,因此通常會強調這種不規則。
  • 其不屬於圖片一部份或出於其他原因的邊框,在正常情況下會影響圖片的使用。若帶有邊框的版本具有特定意義或實用價值(請參見:Category:Images with intentional borders),可上傳不含邊框的版本作為另一個獨立的檔案。

不应移除边框的情形:

  • 移除原屬藝術創作初衷的邊框。例如,裁切某個版畫以移除其手繪邊緣,將導致該圖像無論以何種方式印刷,都無法呈現與原始印刷品相似的外觀。一般而言,對於歷史藝術作品,若邊框自創作之初便已存在,我們通常不應將其移除。這項準則的制定旨在處理使用者在照片中添加邊框的情況,而非鼓勵對歷史作品進行修改,使其偏離其歷史原貌。
  • 如上所述,如果艺术作品的边框不是长方形,这时加入粗边框可以让作品的视觉效果更好。
  • 某些圖片若移除邊框,會產生錯誤的印象。例如,照相凹版印刷圖像通常比包圍的紙張略深,這使得照相凹版印刷品一眼就能辨識出來。若將紙張裁切掉,反而會讓人覺得上傳者沒有進行適當的白平衡調整。同樣地,File:Alfons Mucha - 1896 - La Dame aux Camélias - Sarah Bernhardt.jpg是一張印在白色紙張上的泛黃圖片,而非印在泛黃紙張上的正常圖片,但若裁切掉邊框,後者反而會被誤認為是真實情況。
  • 維基共享資源或任何(作為一般準則的)維基百科上的特色圖片。圖片獲選為特色圖片後,通常不建議對其進行大幅修改;若當初有此需求,邊框本可在特色圖片提名過程中進行裁切。

在這種情況下,邊框是「必要的」,至少在主圖中是如此。當然,若對特定用途而言更為合適,隨時都可以利用{{Extract image}}來請求上傳一張沒有邊框的圖片「副本」,但這類萃取出的圖片通常不應作為預設圖片。

若您發現到圖片有不必要的邊框,請在該圖片上加入模板{{Remove border}}以申請裁切,此操作會將該圖片加入Category:Images with borders分類中。若您發現某張圖片雖有具意義的邊框,但希望請求提供無邊框版本,請在該圖片上添加模板{{Extract image}}以請求進行圖片擷取,此操作會將該圖片加入Category:Images requiring extraction分類。

如何處理某個裁切申請:請將圖片裁切至僅保留相關區域。若要裁切JPEG檔案,建議使用無損裁切工具,例如jpegtran。您也可以使用CropbotCropTool。若裁切後的區域包含文字,請務必在圖片說明中註明。

如何處理某個萃取請求:將裁切後的圖片上傳,並重新命名。

例如:萃取前萃取后

非自由版权的边框

同樣地,某些圖片包含非必要的裝飾元素(例如3D邊框),這在法律上可能有問題,因此需要移除。特別是,{{PD-Art}}圖片不得包含3D邊框。若您發現此類圖片,請在圖片上添加{{Non-free frame}},這會將該圖片歸類至Category:Images with non-free frames

該怎麼做:若圖框為矩形,請將圖片裁切至僅包含自由圖片的區域。若裁切的是JPEG檔案,建議使用無損裁切工具,例如jpegtran。您也可以使用Cropbot。若裁切後的區域包含文字,請務必在圖片說明中一併列出。若邊框為圓形、橢圓形或其他特殊形狀,請使用影像編輯工具選取包含自由圖片的區域,接著反選並將其餘部分填為白色或(針對PNG/TIFF檔案)透明。若您是管理員,建議刪除包含邊框的舊版本。

特定语言和/或特定書寫體的文本

一些图像包含特定書寫體或语言的描述或说明。在某些情况下,文本会是历史作品的固有部分,应该单独保留。但是,任何描述性文本(说明、注释、图例)都应尽可能在文件描述页面中、而非在图像本身中。

該怎麼做:請重新設計圖片,使用顏色代碼和/或數字來標示各元素,以達到語言中性的形式。如此一來,該圖片便能應用於所有維基媒體專案,更重要的是,也能適用於所有維基媒體語言。若您看到此類圖片,請在圖片上加入{{Convert to international}},系統會將其歸類至Category:Images requiring internationalisation

請注意,若同時提供語言中立版本,則可接受包含特定語言的檔案,特別是對於複雜的圖表而言。此類檔案應相互建立連結。此外,對於SVG檔案而言,是否具備語言中立版本的重要性較低,因為這些檔案很容易透過編輯來變更語言。

有較好格式选项的图像

应被改为PNG或SVG的JPEG图像

特定的某些圖像(幾乎所有非照片類的圖像)若採用無損格式或向量圖形格式,外觀與功能表現會更佳(且可能佔用較少空間);我們分別使用PNG和SVG檔案來實現。這類圖像通常包括國旗、圖形、圖示、示意圖、以及特定的某些螢幕截圖(例如來自舊式電視遊樂器或街機遊戲的截圖,但「不包括」具有高色深的新版遊戲截圖)。若您發現此類圖片,請在該圖片上添加{{BadJPEG}},這會將其歸類至 Category:Images with inappropriate JPEG compression。若適用,也請考慮添加{{Convert to SVG}}。(若圖片的JPEG壓縮程度過「高」,則應改為標記{{Overcompressed JPEG}}。)

該怎麼做:請使用影像編輯軟體重新製作或修飾該圖片(使其更清晰),具體方法請參閱 w:Wikipedia:How to reduce colors for saving a JPEG as PNG。請勿在未經修改的情況下直接將JPEG檔案轉換為PNG檔案,因為這樣並不會提升畫質,反而會導致檔案大小增加。關於SVG的建議,請參閱下方。請注意,新檔案將有不同的名稱。完成後,請在舊圖片上標記{{Superseded}}標籤。

範例:之前之後(請參閱category: Posterized to reduce file size)

警告:遺憾的是,由於軟體的限制,系統對PNG檔案的處理稍顯不足:在大尺寸下無法正常顯示,且在建立縮圖時未進行額外的銳化處理,導致縮圖略顯模糊(請參見phab:T20014範例。因此,對於需要無損副本的圖片,通常最好同時提供JPEG和PNG兩種版本。

: 目前維基媒體軟體僅會對全彩PNG與高彩PNG檔案的縮圖進行銳化處理,因此索引顏色的圖片的縮圖會顯得較不銳利(參見phab:T31659範例)。

应当變成SVG的PNG图像或JPEG图像

Images composed of simple shapes, lines, and letters are often better expressed using vector graphics. These have a number of advantages such as making it easier for subsequent editors to edit them, enabling arbitrary scaling at high quality, and sharp high-resolution renderings for print versions. If you see an image like this, add {{Convert to SVG}} to it, which adds it to Category:Images that should use vector graphics. Certain JPEGs and PNGs are not suitable for transfer to the SVG format. These include heavily or artistically shaded images, or non-free images on other projects such as those of logos (conversion to a scalable format can represent a copyright violation). Images that have been uploaded at a high resolution and good quality are a lower priority for transfer to the SVG format. Efforts are better focused on converting lower quality, smaller images that will be substantially improved if redrawn as a SVG. Images which will appear the same but will require marginally less file space are a lower priority.

Raster images generated by libre (free) software programs, for which a source file is made available under a libre license, is also of lower priority. In fact, such images if the source file is provided should be left alone probably if the program does not provide SVG output, or else it may even be *harder* for subsequent editors to modify the image (the opposite of the stated goal above). It does help to request a feature for SVG output from the developers of such programs.

What to do: using vector graphics production software (see en:Comparison of vector graphics editors), remake the image. The original image can often be used as a template. Some notes:

  • A very simple image with known dimensions and colors, like a plain flag, may be easier to make from scratch.
  • A raster image can be vectorized, but be careful: it will almost certainly differ from the original and need some manual work. Do not leave the raster image in the SVG when saving it for upload. Check for redundant code which does not affect rendering (but don’t forget about scalability).
    • Sometimes people base their images on a raster “thumbnail” from a WMF project. See the next item.
    • Raster images based on the vector or raster maps from Commons should often be not just vectorized, but remade based on those maps (see Blank maps, SVG maps, Maps).
  • Graphing tools like gnuplot and R produce high quality SVG output plots in a repeatable way. It is helpful if the source code of the gnuplot commands used to create the graph are included in the description page of the image so that other users can regenerate the plot when necessary.
  • For chemical structures, this page has relevant information.

If the image is derived from a third-party source, first check whether a vector version is available from that source. It is easier to convert a PDF into SVG than to remake the entire file.

2D文件以3D表现更佳

Commons now supports uploads of STL files. Previously, contributors wishing to show a three-dimensional image would resort to uploading a video of the object rotating, or a still image of different views of the object. These are acceptable as ancillary files, but there are cases where the original 3D shape is the best way to convey the desired information. Therefore, there is a template listing files to have a source or derived 3D version uploaded: {{Convert to STL}}.

缩略图的问题

PNG照片需要JPEG版本

Although PNG is not a bad way of losslessly storing photographs, any thumbnail of a PNG appearing in an article will be in PNG format. The result is that these thumbnails have a large filesize, making them slow to download for many users (typically, about 10 times larger than JPEG thumbnails). Although ideally the software would be able to create JPEG thumbnails of PNG images, right now it can't. Additionally, sharpening is applied to JPEG thumbnails but not to PNG thumbnails, and sharpening is usually desirable for photographic thumbnails. See phab:T192744 for details on the design decision to not sharpen PNG thumbnails.

What to do: Create a JPEG version of the file and upload it; quality is not important when we do it this way as long as it looks good. Place {{PNG with JPEG version}} on the original PNG's page and {{JPEG version of PNG}} on the JPEG's page. This alerts people to refer to the JPEG version in articles, but to make edits to both versions, based on the PNG version.

例如之前的PNG之后的PNG之后的JPEG

大型PNG、TIFF和GIF文件

Above a certain size, PNG, TIFF and GIF files are currently not provided with thumbnails by Commons' MediaWiki software (an error message is displayed). JPEG versions linked to the original file via {{Compressed version}} (although it does not need to be a compressed version) should be uploaded for preview purposes and used in Wikimedia websites. See COM:MAXTHUMB.

质量问题

图像分辨率相比原始分辨率缩小

Partly because MediaWiki image pages scale down images by default, it's a common mistake to upload a scaled-down, lower-resolution image to Commons than the original image. This is unnecessary and undesirable; large images are necessary for use in print and other situations. If you see an image like this, add {{Thumbnail}} to it, which adds it to Category:Images uploaded at reduced resolution.

What to do: Upload or locate a larger resolution image of the same filetype. If the image is otherwise identical, tag it with {{duplicate|Image:example.jpg}} and give for the parameter the larger image. You or the person deleting it should use "check usage" to ensure that the small image is no longer used. See COM:Dupe for more information. If the larger image has differences, tag the old version with a {{Superseded}} tag instead.

EXCEPTION: For exceedingly large images, such as this 690 megapixel image, Commons' file viewers such as {{LargeImage}} can break, and the maximum thumbnail size Wikipedia will create is still far, far below the size of the image itself. In these cases, uploading a courtesy copy that can be viewed with the file viewers may be appropriate.

Example 1 (identical): Smaller version, larger version

Example 2 (differences): Smaller version, larger version

Wikimedia projects other than Commons, particularly those accepting non-free content, may prefer uploading of thumbnails for some purposes.

侧向图片或相机明显倾斜的图片

These images need to be rotated so they're upright.

For slightly tilted images this may involve cropping and/or cloning to remove or fill in new areas. If you see an image like this, add {{Rotate}} to it, which adds it to Category:Images requiring rotation. If you want to rotate images by 90, 180, or 270 degrees add the parameter |degree=90/180/270 to let it rotate automatically by Rotatebot (e.g. {{Rotate|degree=90}} or simply {{Rotate|90}} to rotate 90° clockwise). Such rotation is done with the best available method to keep loss of image quality to a minimum (it is called "lossless", though this is usually not quite true) [1] .

包含常规噪声、纹理或干扰的图像

A variety of sources can introduce unwanted overlaid patterns into an image, such as halftone patterns and text from the opposite page side bleeding through in scanned images and the presence of electromagnetic interference during image creation or processing. All of these (and also naturally occurring patterns, which should not be removed, such as fences and parts of other man-made objects) can cause moiré patterns to occur when resampling images without extra care taken to avoid them – something that is prone to happen in automatically generated image thumbnails for articles in particular.

What to do: Add {{CleanFFT}} to the image to include it in Category:Images containing regular noise. After that, ideally, find a better version of the picture that does not contain the noise. If this is not possible, in many cases you can clean up this type by editing the image in the frequency domain by doing either a Fourier or wavelet transform on the image. Such transformations can be done in both GIMP and Adobe Photoshop with the aid of suitable plugins. For more information on how to do this, see Commons:Cleaning up interference with Fourier analysis. If the size of the patterned noise is significantly smaller than the image details' then simply slightly blurring the image or using other general denoising methods can be very effective in eliminating them without any degradation to image quality, too.

例如:

低质量图像

Some images are not sufficient to clearly demonstrate the subject of the image; whether by being too blurry to digitally fix, being of small resolution and/or compression, not properly demonstrating the subject of the image, or being visually unappealing in another way. New versions with higher quality should be found and used instead. Low-quality images can be tagged with {{Low quality}} (or if applicable {{Blurry}}) to add them to Category:Images of low quality.

What to do: get a camera and take a better image, or try to find one under a free license. See, for example, 共享资源:自由媒体资源.

版本控制

For cleaned up media, a rule of thumb is to:

  1. first upload the original, dirty media;
  2. upload the cleaned up version over the dirty version.

This allows the dirty version to be recovered if desired, but not included or linked to directly.

Alternatively, one can upload the cleaned up version under a different name; this is particularly useful if several different clean-ups are done. See discussion on cropping.

技术说明

  1. It is called a "lossless" method because it does not involve recompressing the entire image using the JPEG lossy compression algorithm, which involves a loss of image detail (though the JPEG algorithm attempts to lose image detail the human eye does not notice much, recompressing an image that has already been compressed with a good compromise between file size and image quality may noticeably worsen image quality). Although Rotatebot uses jpegtran to losslessly rotate JPEG images, the rotation is not completely lossless as images of sizes which are not a multiple of the JPEG block size (16×16 pixels for color images, 8×8 pixels for grayscale images) have to be cropped to a block boundary. For images of a reasonably large size this cropping is usually not noticeable. Truly lossless rotation can be done by changing only the EXIF Orientation tag (e.g. using the exiftran or Geeqie programs), as this implements rotation for display purposes only (assuming the image viewing software respects the Orientation tag), without modifying the original image.

参见

Category:Media for cleanup#%20 Category:Commons projects/zh
Category:Commons projects/zh Category:Media for cleanup