Image reference regions / exporting cropped images

Context

I have a bunch photos stored in a media folder on disc - many of which showing multiple people. I added these photos to various people via the Person details / Gallery / + button. In the Media Reference Editor I click-and-dragged a rectangle to “crop” the portrait photo of the person of interest. This portrait is finally shown as the primary picture for the person.

Graph View addon

I have the Graph View addon installed. It shows the cropped portrait photo. I can “print” the visualization into *.gv and *.svg files and open them with InkScape. There the cropped portrait photos (image reference regions) are also shown correctly.

Topola Genealogy Viewer aka. Interactive Family Tree addon

I have the Interactive Family Tree addon installed. When I the exported visualization is shown in the browser all photos appear in “full size”. The cropped portrait photos (image reference regions) are ignored.

Proposal: Exporting cropped images

Given that some addons do not handle the image reference regions defined in Gramps I wonder if there is a way to export the cropped regions into image files (copies) on disc.

These could then be (automatically/manually) referenced instead of the full blown original photos. These intermediate steps would allow to comfortable use addons such as Interactive Family Tree which do not support image reference regions yet.

Related


I am running Gramps 5.1.5 on Ubuntu 20.04.3.

Have you looked in the generated Thumbnails folder.

I found thumbnails in $HOME/.gramps/thumb.

.gramps/thumb
├── large
└── normal

Both contain pretty small images (180px max), though. They would not be useful for my use case. I would love to reference “real” cropped images with original dimensions. This is because as an output result I want to print the family tree and pictures as a poster in the best possible resolution.

The reason the Topola viewer doesn’t handle cropped images is that it is exporting to GEDCOM as an intermediate format. GEDCOM 5.5.1 does not have a way to specify a cropped image, although some of the other software that uses GEDCOM have created extensions to support that. Unfortunately they don’t all do it the same way.

GEDCOM version 7, just recently released does have a way to deal with this. Eventually Gramps and other software will be upgraded to support GEDCOM 7, but for the moment, what you are suggesting would be necessary.

I think a Gramps addon could be written to create the crops. It would have to know where to put them, and chose a reasonable naming scheme. And come up with a way to avoid duplicates.

The more difficult decision is to figure out how to attach the crops to the media objects. I would do it as part of an export to a new tree, either GEDCOM or XML, to avoid messing up the original tree.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.