HeardLibrary / vandycite

0 stars 0 forks source link

Replace TIFFs in IIIF server s3 bucket with pyramidal tiled TIFFs #65

Closed baskaufs closed 2 years ago

baskaufs commented 2 years ago

This can be scripted using part of the Commons upload script.

First, need to check the gallery_image_conversion_log.txt file in the ~/gallery_pyramidal_tiffs/ directory to reconcile failed conversions against the image list.

baskaufs commented 2 years ago

Script is linked-data/commonsbot/convert_to_pyramidal_tiled_tiff.ipynb in addition to gallery_works/image_upload/ in this repo

baskaufs commented 2 years ago

In https://github.com/HeardLibrary/vandycite/commit/0c951ddafcb13c2a05adef9a9422661ec319dfe1 fixed problems with alternate file extensions and filenames that contained spaces. There was also a file, 1976.010.tif, that was apparently too tiny to get converted, so I ignored it since tiling and pyramids would be fairly useless and it will probably be passed over anyway due to too low resolution.

baskaufs commented 2 years ago

Note: after checking the error log and comparing the input and output files, pretty much none of the warnings were meaningful, and they could mostly be ignored.

baskaufs commented 2 years ago

It appears that they've optimized the display of the Gallery images in Commons now by generating and serving smaller images. So I don't think that I need to re-upload the pyramidal tiled TIFFs to Commons. Nonetheless, apparently one can just upload the same file name, but instead of using the file template as the text, use the description text for the new version. That's done in the "text" value in the JSON sent to the API. The "comment" value is what shows up in the edit history. The previous "text" value (page template) is apparently not modified.

baskaufs commented 2 years ago

Finished with https://github.com/HeardLibrary/vandycite/blob/master/gallery_works/image_upload/convert_to_pyramidal_tiled_tiff.ipynb and https://github.com/HeardLibrary/vandycite/blob/master/gallery_works/image_upload/upload_pyramids.ipynb