CropTool is a MediaWiki tool for cropping images at Wikimedia Commons and other Wikimedia sites. It supports JPEG, PNG, TIFF and (animated) GIF files, and can also extract single pages from DJVU and PDF files as JPEG for cropping. CropTool is inspired by User:Cropbot, but adds some new features, such as OAuth for authorization and automatic border detection. It runs at Toolforge, and the source code is available at GitHub. Recent usage of the tool is available from recent changes.
After activation, it will appear in the “Tools” menu of the left column.
Alternatively: go to toolforge.
|1. Here is an image that should have its border removed. Start by clicking “CropTool” in the “Tools” menu.|
|2. To use CropTool, you need to authorize it to use your Wikimedia Commons account using OAuth.|
|3. This will take you to a secure MediaWiki OAuth server. Note that your password is never transmitted to CropTool.|
|4. Make a selection with the cursor and press “Preview”. In this case, we need to make an exact (Precise mode) crop, since we want to keep as much of the image as possible, while removing the border. Note that in many cases an inexact (Lossless mode) is completely sufficient and recommended.|
|5. Looks good, so we can go ahead and press “Upload”.|
Install on other projects
If you want to have CropTool active on all Wikimedia projects you may use the following code at m:Special:MyPage/global.js. Don't forget to disable CropTool on all projects before you add it globally.
- Sometimes, immediately after you overwrite a file, you do not see apparent changes to it, or it appears "distorted". This is usually caused by caching. To solve the problem, you can simply purge the page. Append
?action=purgeto the URL and then press ↵ Enter. If that doesn't solve the problem, follow the instructions at w:Wikipedia:Bypass your cache/Simple instructions.
- As of September 2020, all cropping is done using lossy mode, even if lossless mode is selected and the tool says that a lossless crop was performed.
- Crops from large TIFF files are sometimes compressed leading to broken files