# Image reference regions / exporting cropped images

**URL:** <https://gramps.discourse.group/t/image-reference-regions-exporting-cropped-images/2277>\
**Category:** Help\
**Created:** [February 17, 2022, 5:26pm UTC](https://gramps.discourse.group/t/image-reference-regions-exporting-cropped-images/2277 "2022-02-17T17:26:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tbsprs](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/tbsprs/32/1695_2.png) [@tbsprs](https://gramps.discourse.group/u/tbsprs)\
**Post date:** [February 17, 2022, 5:26pm UTC](https://gramps.discourse.group/t/image-reference-regions-exporting-cropped-images/2277/1 "2022-02-17T17:26:54Z")

</div>

# 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](https://gramps-project.org/wiki/index.php/How_to_create_image_reference_regions) 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_](https://gramps-project.org/wiki/index.php/Addon: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_](https://inkscape.org). 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_](https://gramps-project.org/wiki/index.php/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

- [Profile picture cropping too aggressively?](https://gramps.discourse.group/t/profile-picture-cropping-too-aggressively/275)
- [Adding Image Workflow](https://gramps.discourse.group/t/adding-image-workflow/2193)
- [Have shared Information auto open up in Media Reference Editor](https://gramps.discourse.group/t/have-shared-information-auto-open-up-in-media-reference-editor/833)

* * *

I am running Gramps 5.1.5 on Ubuntu 20.04.3.

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [February 17, 2022, 5:46pm UTC](https://gramps.discourse.group/t/image-reference-regions-exporting-cropped-images/2277/2 "2022-02-17T17:46:45Z")

</div>

Have you looked in the generated Thumbnails folder.

---

<div class="post-metadata">

**Author:** ![tbsprs](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/tbsprs/32/1695_2.png) [@tbsprs](https://gramps.discourse.group/u/tbsprs)\
**Post date:** [February 17, 2022, 7:13pm UTC](https://gramps.discourse.group/t/image-reference-regions-exporting-cropped-images/2277/3 "2022-02-17T19:13:26Z")

</div>

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

```bash
.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.

---

<div class="post-metadata">

**Author:** ![prculley](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/prculley/32/41_2.png) [@prculley](https://gramps.discourse.group/u/prculley)\
**Post date:** [February 17, 2022, 9:51pm UTC](https://gramps.discourse.group/t/image-reference-regions-exporting-cropped-images/2277/4 "2022-02-17T21:51:02Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/gramps/original/1X/2ac1e712b7adf612e31ca08a55419f4cf37c0158.png) [@system](https://gramps.discourse.group/u/system)\
**Post date:** [March 19, 2022, 9:51pm UTC](https://gramps.discourse.group/t/image-reference-regions-exporting-cropped-images/2277/5 "2022-03-19T21:51:41Z")

</div>

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