Skip to content

Conversation

@lucaswerkmeister
Copy link

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.

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 [1],
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.

[1]: https://www.wikidata.org/wiki/User:Lucas_Werkmeister/Wikidata_Image_Positions
@lucaswerkmeister
Copy link
Author

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.…

@danmichaelo
Copy link
Owner

danmichaelo commented Dec 22, 2019

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.

@LeoLopez76
Copy link

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.…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants