This is an archive of past discussions. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page.
I was trying to upload a separate cropped version of an image when I got this error:
Upload failed! [api] Received error: modification-failed : The file "Mathieu Smedts.jpg" does not exist on [https://commons.wikimedia.org/ Wikimedia Commons].
Indeed, there's no Commons image by that name yet, but the cropping is supposed to create the image by that name. Is there any way to fix it? ミラP@Miraclepine02:34, 3 November 2020 (UTC)
Two blue lines are moving horizonally. The program waits for an action by the browser, I guess. Must be a issue with my Firefox. --Mateus2019 (talk) 00:43, 14 March 2021 (UTC)
I too have had no issues, and I'm using both Firefox and Chrome. Is there a particular image you are trying this on? Link? — Huntster (t@c)04:49, 14 March 2021 (UTC)
Blocked user
The following report I received for uploading a cropped image: "Upload failed! [api] Received error: autoblocked : Your IP address has been blocked automatically, because it was used by a blocked user."
In Commons I'm not blocked, I've no idea, why I should be blocked in CropTool, and no idea, how to be unblocked.
Why does the message only appear the moment I try to upload the image and not immediately? Why is the blocked user not named? Am I blocked or someone hijacked my IP address?--Im Fokus (talk) 03:25, 26 March 2021 (UTC)
It's not you — I get the same error. If I had to guess, I would say that an IP address used by CropTool server has been blocked. —Iketsi (talk) 04:07, 26 March 2021 (UTC)
It was happening because of some autoblocks which affected Toolforge, they are now unblocked. Should be good now. -- CptViraj (talk) 15:38, 26 March 2021 (UTC)
Hello, I'm new to commons, but an established editor (itsfullofstars) on the en wikipedia. I'm trying to upload a cropped version of an existing commons image and I'm getting this error:
Upload failed! [api] Received error: abusefilter-disallowed : ⧼abusefilter-warning-scope⧽
I have no idea why an abuse filter is being triggered. The original image I'm trying to crop (there's too much sky above the airplane) is here:
I was attempting to upload the cropped version under a new name so as not to mess with the original. Can someone help? Thanks in advance. Itsfullofstars (talk) 16:47, 8 June 2021 (UTC)
Addendum: Maybe I used the wrong terminology when I said I was 'uploading'. I was just using the CropTool on an existing image of commons, not really uploading from my PC, per se. Also, I DO have a small upload history (I uploaded an image on May 15, 2021) so I'm not a brand-new commons user with zero history. I just wanted to make that clear, because after looking at the FAQ it seems that brand-new users have extra restrictions. While I was at the commons FAQ I searched for the word 'abuse' and there were no hits. I'm stumped why a mysterious 'abusefilter' doesn't like me, especially since the original file I want to create a cropped version of is already on commons, and has been there since 2014. Itsfullofstars (talk) 21:39, 8 June 2021 (UTC)
In my own PDF viewer offline, right-clicking on the first image, giving it an appropriate name in the form "Source-article-name_Figure-number_shortened-figure-caption", and saving it as a jpg, repeat for each of the images.
Uploading all these high-res files (took awhile, and some uploads failed on the first try).
Manually copying all the (machine-readable, already formatted in Wikisource) figure captions from the paper into the metadata of each image.
Manually re-associating each image with the relevant position in the Wikisource text and formattiing it.
Had the PDF been a scan with one image per page, I'd have had to:
crop the images manually
name them
save them
possibly run them through a standard command-line script for restoring yellowed paper, or rotate them to be square and upright, using other desktop programs
re-upload
re-caption with text already machine-readable on Wikisource
re-associate them with their positions in the book
Here's an example, from a historically important book. This book is linked to on Wikipedia, and contains many line drawings that could be useful there. The book is on a visual topic and greatly benefits from illustrations, some of which have been cropped and inserted, and some of which have also been restored, but most of which have simply been missing for years.
Volunteers could do much more were some of this automated and less tedious. Images, separated out, would be much more useful on Commons. It would encourage people to upload heavily-illustrated books to Commons. It would also save bandwidth and hence energy. I do not need millions of pixels to crop or rename an image; a thumbnail would do fine.
Really any incremental improvement on the status quo would be very welcome, so I hope no-one will be daunted by the perfectionist features list below.
Desired workflow, first rough draft, suggestions welcome
For PDF files with embedded image files, auto-extract, auto-name according to a given pattern, auto-add captions if such are identifiable (if in doubt, add surrounding text to the field in question and prompt human review before saving separate files; manual removal of extraneous text is faster).
If the images cannot be extracted automatically, semi-automate:
On the Wikisource document page, go to the template indicating that there was an illustration at this point in the original; this should link to a page loading the scanned page image in the croptool. Either:
Adjust automated guess as to which rectangles contain illustrations
Manually draw a polygon around the illustrations (rectangle default)
Rotate as needed, with a preview tool. This could probably be semi -automated, such as for images in rectangular frames which are 15 degrees or so off-square.
When all the images to be extracted have been displayed, if the colour adjustment is bad, click for automated colour adjustment (the aforementioned script's algorithm).
If the automatic colour adjustment is bad (unlikely), click to skip the colour adjustment and template the cropped Commons file as needing white balance adjustment. Otherwise, click "Done"
Click OK. The images are automatically cropped, adjusted, uploaded with suitable metadata (derived from Wikisource, which already has a machine-readable source and caption) to Commons, and inserted into the Wikisource text.
As this must be repeated for every illustrated scanned page in the book, it might be nice to save the previous settings as a default or make batches possible.
Yes, that's often not bad for full-page illustrations, though it does leave wide printer's margins which look odd online. For multiple images per page, and images with flowed text around them, it's not as good. Both are common in old books and digital-native academic papers (sorry for the slow reply, C.Suthorn!). HLHJ (talk) 03:38, 2 June 2021 (UTC)
Actually, just being able to crop multiple images from a PDF at once, then preview them all at once, would be a great time-saver. HLHJ (talk) 04:03, 11 June 2021 (UTC)
Difference b/w this and windows photos
Is there any difference in quality if instead of using this croptool, I download the image in windows computer and use edit mode of "photos" app and re-upload? -- Parnaval (talk) 16:49, 28 July 2021 (UTC)
@Jeff G.: OK, thanks. Now I understood croptool.; I cropped the image to remove watermark but now I understood that it is a major crop. I will upload a separate file from next time. -- Parnaval (talk) 11:19, 30 July 2021 (UTC)
Hi, thanks for developing this great tool. Recently, I want to crop images from both pages of the book into one image (see File:Serat Damar Wulan (page 12-13 crop).jpg for example), but the tool lack the option to do so, which is understandable. Hopefully this could be implemented in the future.
Since I don't want to upload 2 files to Commons (there's almost 200 illuminations in that PDF, I want to combine some of them that are side-by-side), I had to resort to upload one file (page 12), then overwrite it with the final image (page 12-13).
My questions are:
After I arrive at the last step just before clicking upload, where does the full size (not thumbnail) version is stored? Is it possible to download it without uploading it to the Commons first? I believe it would be useful provide a link to download the cropped image, not just upload it to Commons.
If the above method is not possible for whatever reason, is it possible to upload and overwrite a file (a temp file) in Commons? (in my case I tried it at File:Serat Damar Wulan (page crop).jpg) That way I could upload the temp files there, and at the end I would ask admin to delete just that one file (compare to uploading and asking to delete ~100 files). I'm asking because there's already a feature to upload the original file, so making a feature to upload to another file should not be a problem.
Huntster Thanks for the response! What I meant for #2 is to upload (and overwrite) the test file from the croptool. It goes back to #1, because I don't have the full size image to download, so I need to upload it first, but I don't want to upload ~100 images that I have to request to delete. (croptool is the only way for me to get the high-res crop from the PDF. Feel free to suggest any other cropping tool that can crop up to 3000px).
The flow would be: I crop the page, when there's form asking if I want to upload to a new file, I enter File:Serat Damar Wulan (page crop).jpg as the target filename, and when I click "Upload", there will be a prompt "Do you want to overwrite that file?", then I click "Yes", and it will be overwritten. Repeat ~100 times. I know it's not ideal, but I'd prefer to upload the highest possible res while I can for this collection, and the images are not meant to be separate, but joined (left and right page). Bennylin (yes?) 18:39, 30 September 2021 (UTC)
Bennylin, I agree that the highest resolution files are best. I see no problem with the route you are proposing, using the filename as a temporary host. Let me know on my talk page when you are finished and I can remove it for you. — Huntster (t@c)19:34, 30 September 2021 (UTC)
I go to make use of CropTool on some images which I've just uploaded (having previous made use of it) and I get a prompt asking to connect to my Wikimedia account. Odd in that i've used it in the past, but I've not used it for a while so probably some housekeeping done in the interim. I tell it to connect, but I get this for an error message: "Curl error: SSL certificate problem: certificate has expired." Huh?? Tabercil (talk) 14:25, 30 September 2021 (UTC)
Did some playing around - error message appears irregardless of what browser I use to access it. Whether it's Firefox that's locked down with script and cookie filters, or Edge in it's default state (which I deliberately keep that way for those rare sites that do not play nice with Firefix). So it doesn't appear to be something that's on my end. Tabercil (talk) 19:43, 30 September 2021 (UTC)
Looks like a great tool. However, when I added it to my preferences and went to an image then clicked on the #CropTool link (step 2 in the Commons:CropTool instructions), I get the following error message: "500 [api] Received error: mwoauth-invalid-authorization-invalid-user : The authorization headers in your request are for a user that does not exist here." If I continue to step 3, to Allow OAuth server, click Allow, then I go back to the error page again. --Greg Henderson (talk) 21:57, 9 October 2021 (UTC)
@Jeff G.: Yes, I am logged in; I am using the default preferences. I do accept cookies unless there is a prefernce to turn ON; Not sure about cross-site scripting on WMF domains; Is there anything you have to do in mediawiki.org? I am using a Mac and Safari. --Greg Henderson (talk) 23:02, 9 October 2021 (UTC)
this file, like many others, is not a featured picture. But the CropTool adds it in wrong categories.
I've fixed the issue here, here, and in other files (none were my own derivative works), but that's not finished. Other photographers are not active on the project, or not ready to fix others' mistakes. So I'd like to learn how to deal with the issue.
According to the archives (here), the problem was raised by Geagea: "Also most of users do not remove extra categories. Maybe if they have the list of categories with +/- it would be easier for them remove them." But apparently not managed. Best regards -- Basile Morin (talk) 06:33, 11 October 2021 (UTC)
Yes, it was good suggestion but nobody fix it. moving the info from "description" field to " Original file description" is essential change. Letting an option to add description would be also useful. and the last issue is the categories. Now I see that removing "Featured pictures" templates are also needed. -- Geagea (talk) 07:36, 11 October 2021 (UTC)
Thanks, Geagea. I agree with your proposal. The tool seems to remove automatically the QI-related categories, but not the FP ones. Concerning the standard categories, the uploaders don't bother with them, and the interface does not help. Example with my photographs, but that's easy to verify also on many others (for example Kim Jong Un (alone) "with Vladimir Putin", until someone notices several months later). The users of this tool consider there is no CropTool manual or interface, "so this might be a documentation issue." The page COM:CropTool does not say anything either -- Basile Morin (talk) 08:11, 11 October 2021 (UTC)
@Jeff G.: I didn't get that tag... again. The tool seems to have some kind of false positive. When I attempted to overwrite it, I checked the history over and over again just to make sure that the only revision was original uploader's. Unnamed UserName me19:24, 16 October 2021 (UTC)
Probably because the image was assessed as "digital watermark"ed. (which is funny, bacause the watermark could be removed by cropping) --C.Suthorn (talk) 04:55, 17 October 2021 (UTC)
error while trying to extract image from DjVu files
Recently, when trying to extract a picture from a djvu file, Croptool failed, with message " Command "convert '/mnt/nfs/labstore-secondary-tools-project/croptool/public_html/files/72063e998a89064c9173fb0d87fcd10262969354.djvu.page1.jpg.tiff' '/mnt/nfs/labstore-secondary-tools-project/croptool/public_html/files/72063e998a89064c9173fb0d87fcd10262969354.djvu.page1.jpg' 2>&1" exited with code 1: convert-im6.q16: memory allocation failed `/mnt/nfs/labstore-secondary-tools-project/croptool/public_html/files/72063e998a89064c9173fb0d87fcd10262969354.djvu.page1.jpg.tiff' @ error/tiff.c/ReadTIFFImage/1622. convert-im6.q16: no images defined `/mnt/nfs/labstore-secondary-tools-project/croptool/public_html/files/72063e998a89064c9173fb0d87fcd10262969354.djvu.page1.jpg' @ error/convert.c/ConvertImageCommand/3258."
Croptool used gs for pdfs and ddjvu for djvu files but stopped to do so recently. For webp files it is not shown on the file descripiton page.
It looks like the maintainer is not available at the moment, otherwise he would fix pdf and djvu. It does not like that he will add webp soon. C.Suthorn (talk) 13:13, 15 June 2022 (UTC)
Lossless mode no longer working?
@Danmichaelo, is lossless mode still working. I used to get messages that the crop size had been adjusted because I wasn't starting on a multiple of 8 or 16, but this has gone away. Similarly, there's a bug report on github (#170) reporting that files that should be uncroppable in lossless mode are now working, but produce the same files as if they were in precise mode. Is the tool silently falling back to precise when lossless doesn't work (which would be undesirable), or is something else going on here? Perhaps a bug introduced in the September 2020 refactoring? Ahecht (TALK PAGE) 14:59, 15 June 2022 (UTC)
Looking into the code more, it seems like the September 2020 refactor fundamentally broke things. The various types of crop were broken out into subclasses (for example, lossless Jpeg cropping was broken out into JpegFile and Gif cropping to GifFile), but as far as I can tell the only subclasses that are actually being called out by the program in FileRepository.php are TiffFile, DjvuFile, PdfFile, and SvgFile, all of which return errors instead of actually working. All other file types are being handled by the generic imagemagick call in File.php.
This is why lossless crops are no longer lossless, Gif files say they are being cropped with precise or lossless mode instead of "gif mode", and TIFFs, PDFs, and DJVUs no longer work.
If these issues aren't easy to resolve, perhaps to the tool should be rolled back to 1.4 (before the refactoring). Ahecht (TALK PAGE) 14:18, 17 June 2022 (UTC)
Tiff files
Should we not block use of this tool for cropping tiff files?
Reference files should kept as original. Only jpg's are good for cropping, tiff are not. If used on wikipedia they (tiff) should be converted into jpg, cropped or not?
@Jeff G.: None uploaded this year. The only tiff's that have been uploaded have come pre-cooked from institutions. In any event they are already cropped. I have yet to see any privately uploaded tiff files, and in any event they would not want cropping. Numbers must be miniscule. Abuse of reference files is a more pressing problem. If they want cropping they should be presented as jpg's. Broichmore (talk) 16:33, 17 January 2022 (UTC)
Well that would only justify blocking the 'Overwrite' option, but even that is rather doubtful - all I did was trim a bit of deadspace, and institutions can be quite relaxed about providing images with plenty of that. I don't think it's worth messing with the tool, actually: it's clear that people use the option very rarely. A bigger problem is with the size of some of the TIFFs which can be approaching the 100 Mbyte limit, making the images difficult or impossible to manipulate on ordinary PCs. Chiswick Chap (talk) 14:51, 26 January 2022 (UTC)
I agree with Jeff G. and Chiswick Chap; there are valid reasons to crop tiffs and PNGs following the same rules as any other file type. If it is true that tiffs are most frequently used for archival/reference material, the furthest I'd go is adding an extra-noticeable warning suggesting new file mode when cropping tiffs in overwrite mode. That would have prevented me from overwriting the file above (oops). – BMacZero (🗩) 23:20, 27 January 2022 (UTC)
What valid reasons?, cropping is a degrade on any type of image, and reference files are supposed to be maximum definition, why else have them?
This image is a JPEG version of the original PNG image at File: Receiving ship "Vermont.", from Robert N. Dennis collection of stereoscopic views.png.
Generally, this JPEG version should be used when displaying the file from Commons, in order to reduce the file size of thumbnail images. However, any edits to the image should be based on the original PNG version in order to prevent generation loss, and both versions should be updated. Do not make edits based on this version. See here for more information.
Many museums, for example the Cleveland Museum of Art, have very kindly uploaded thousands of tif files that often have huge margins and need considerable cropping before using on wp & no doubt many other places. Here's an example. Johnbod (talk) 17:15, 23 June 2022 (UTC)
To continue to use this for tiff/pdf files, it would be good to have a separate version with the code as of last month. -- Enhancing999 (talk) 10:21, 21 June 2022 (UTC)
Since the error message is "Command not found", the problem is not necessarily related to a code change. Maybe a file or path has been modified on the server. Seudo (talk) 10:09, 11 July 2022 (UTC)
Is there are a way to do bulk processing? I noticed at Category:Views from Peak Walk (Scex Rouge), most photos have a border that probably looks good in some contexts, but not necessarily here or in Wikipedia.
The feature "magic border locator" correctly recognizes it.
When creating a new image with the tool, would it be possible to copy across some or all of the structured data to the new image? (Plus any suitable additional statements to identify the new image as based on (P144) the old one)
I recently used the tool on this geograph photo to extract the just the plaque, and got a bit of a shock when the new image had a description template that was completely blank. (Because all of the metadata for the geograph image had been stored as structured data, and none of it had been copied across).
This is presumably going to become more and more of an issue, as increasingly more images have more of their metadata stored as structured data rather than wikitext. -- Jheald (talk) 18:37, 16 July 2022 (UTC)
Remove border, but upload under new name
It could be interesting to make the following work:
{{Remove border}} from original file when uploaded as new file option is used and "removed border" was checked (same as when original file is overwritten).
In the summary, there is just "11 % horizontally, 24 % vertically" (percentages from a random crop).
"32 % overall" (or something like it, based on the other percentages) could indicate the percentage of the original image surface that was cropped. Enhancing999 (talk) 20:00, 28 July 2022 (UTC)
@Enhancing999: Where H=% horizontally and V=% vertically, one can calculate C (cropped out %) as (1-(1-(H/100))*(1-(V/100)))*100, or K (kept %) as (1-(H/100))*(1-(V/100))*100. — Jeff G. ツ please ping or talk to me20:52, 28 July 2022 (UTC)
I recently cropped the following file of American rapper Desiigner, and on the English Wikipedia, his image has become distorted as a result. This is only an issue on the English Wikipedia, which was the only place outside of Wikimedia Commons that featured the image before it was trimmed. And now I am finding that this is an issue with thumbnail generation considering that when I added this image here on this page, it was also distorted. I'm leaving it here if anyone could fix it or inform me of anything I can do. Knightoftheswords281 (talk) 23:17, 11 February 2023 (UTC)
The recently added "Problems" section has… problems.
I can see no good reason for "overwrote" to be past tense. It should be "after you overwrite".
The advice to append ?action=purge to the URL is OK, and solves some server-side problems, but it doesn't solve others; and of course it does nothing for client-side issues. If we are going to go into this on this page (and I honestly don't know if we should) we also need to explain that if it works correctly under a different browser then it is certainly a client-side issue, and we need to explain how to do a hard refresh in the popular browsers. - Jmabel ! talk01:26, 11 March 2023 (UTC)
@Enhancing999: dont add things that are not problems. adding black or white/transparent space is a choice of design. you want something different? you can write a feature request. not everything that doesnt meet your need is a problem and not every problem is worth mentioning. RZuo (talk) 18:36, 15 March 2023 (UTC)
It's a matter of POV if it's a problem or not, but maybe you have a sample where it's actually a wanted feature. If you prefer to phrase it differently, please do so, but avoid leaving it to users to eventually rediscover the limitations. It's just a waste of time. Good to hear that feature requests will be handled. Enhancing999 (talk) 20:12, 15 March 2023 (UTC)
1 page tiffs and "The overwrite option is disabled because this is a multipage file."
The warning used to be displayed before, but it may no longer possible to overwrite such files.
Entering "Daikoku Pier.jpg" manually then pressing "open", I am told "File «Daikoku Pier.jpg» found on «commons.wikimedia.org»." but then nothing happens.
What’s the best way to rotate and crop the horizon with CropTool?
It’s easy to rotate and crop the horizon on an iPhone, is there an easy way to do it with the crop tool? I tried rotating -3, which worked but then how to crop the rotation around the edges
Has anyone encountered a bug where the CropTool thinks everything is a bad file name, yet saves the name as an extracted file name even tho the file didn’t save? You can see all my attempts on this file: File:L-23-01-03-A-0260 (52606773274).jpg, which I’ll tidy later but will leave for now to illustrate the issue. I’ll work around it but wanted to flag in case it’s not an isolated issue. Innisfree987 (talk) 00:26, 6 May 2023 (UTC)
yes i've had this problem before. croptool would edit the source file page even if the upload as a new file fails. RZuo (talk) 12:28, 6 May 2023 (UTC)
CropTool isn't working for me. I get a "504 Gateway Time-out". Is something wrong with the tool, or is it a toolforge issue? Schwede6600:09, 1 September 2023 (UTC)
Can't really expect this tool to do everything. Download to your computer and do that in GIMP, Photoshop, etc. - Jmabel ! talk23:48, 16 October 2023 (UTC)