croptool icon indicating copy to clipboard operation
croptool copied to clipboard

Proof of concept: use structured data regions

Open lucaswerkmeister opened this issue 6 years ago • 3 comments

Using Structured Data on Commons, users can define which subjects are depicted in an image, and which region of the image they reside in. (One way to define these regions is the Wikidata Image Positions tool, which despite its name also supports Commons.) We can use these regions as a basis for cropping – for example, if an editor has already marked where individual people are located in a group photo, the same data can be used to crop out images of those individuals.


I don’t think this is ready for merging yet, but I hope that you can help me improve it :) there are some TODOs in the source code to indicate what I think is missing. Not all of them are necessary to fix before merging, I think – the most important one is probably the user interface to select one of the depicted regions (instead of prompt), which I hope will be easier for you than for me, since you’re more familiar with the UI framework used here.

This is also fully implemented client-side, though I get the general impression that most of this tool is currently implemented server-side, with the client-side code talking to the server to do the heavy lifting. I hope that’s okay with you.

The code should be compatible with all MediaWiki-supported browsers (including IE11), though I’ve only tested it in Firefox 72 so far.

lucaswerkmeister avatar Dec 22 '19 18:12 lucaswerkmeister

Other TODOs:

  • I suppose there should be some loading indicator while it’s busy loading the entity data and item labels, just like for the magic border locator.
  • If the image is rotated, it probably doesn’t make sense to use this feature.…

lucaswerkmeister avatar Dec 22 '19 21:12 lucaswerkmeister

Thanks, I'll look at the the TODOs in a few days (after Christmas :)). Update Jan 7: Sorry I still haven't had a look at this, but I've not forgotten about it.

danmichaelo avatar Dec 22 '19 23:12 danmichaelo

Other TODOs:

  • I suppose there should be some loading indicator while it’s busy loading the entity data and item labels, just like for the magic border locator.
  • If the image is rotated, it probably doesn’t make sense to use this feature.…

LeoLopez76 avatar Apr 29 '23 15:04 LeoLopez76