Updating image while keeping notes and sections

Hello!

I have a question concerning the possibility of updating certains photos inside an item.

I’ve imported a few newspaper PDF files inside tropy, and each of the pages got transformed into a distinct photo. For each page, I’ve created a few sections, to select articles that are relevant to my research.

Recently, I’ve discovered newer versions of the same newspapers, more readable than the ones that I’ve already imported and annotated. So my question is, is there a way to replace pages (images) of items, without losing its notes and sections?

Thanks in advance!

The most tricky thing here are probably the selections: if the new images have different dimensions than the current ones, the selection coordinates will be different and therefore you can’t easily the images.

In an advanced project you can replace a photo in two ways: if you want to replace the original file, you can just locate the original (e.g., by using ‘show original file’ from the photo context menu) and then replace the file with the new one in your file manager. Back in Tropy, right-click on the photo and select ‘consolidate photo’ from the menu. This should detect that the file has changed and update the relevant values. If you want to link to a different file instead, you could temporarily move or rename the original file and then consolidate the photo in Tropy as above: because the original is missing, Tropy will prompt you to select the file and you can proceed to select the new version this way. Afterwards you could restore the original file again.

For standard projects, you can theoretically do the same thing, but I’d recommend against it, because there Tropy expects the files in the asset folder to match the file’s checksums – so here I think it would be better to import the new files separately.

For PDFs the process is a little bit more complicated too, because each photo links back to the same file and, furthermore, for the selections to stay intact, we’d have to guarantee that the new pages have exactly the same resolution/dimensions as the original ones. Since the image quality is higher, I assume that will not be the case so transferring the selections to the new images will be a little trickier.

That said, it might be easier to import the new files separately and just try to copy/move over the annotations. How many pages and what sort of annotations are we dealing with? Have you added metadata at the photo- and selection-levels or only notes?

Also, can you compare the dimensions of the pages in the new and old versions? If they are identical or if the difference is consistent across all new PDFs then I think we could try to update your project database with a script (we could update the path to the PDFs and update the selection coordinates accordingly).

Hello Inukshuk,

Thanks a lot for the reply.

Sorry for the delay. Finally, I did managed to update the images manually, replacing the files inside the troppy project.

Nevertheless, thanks again for the answer. Will try one of the other solutions if the current one ever stop working.