Open wrenaria opened 4 years ago
This is going to get into the weeds. The short; our IIIF server doesn't support 16 bit grayscale images. Convert to 8 bit and everything should work.
The long; Loris defines (https://github.com/loris-imageserver/loris/blob/development/loris/img_info.py#L20) its PIL image types which doesn't include the experimental (limited support) types (https://pillow.readthedocs.io/en/stable/handbook/concepts.html), including I;16
which is why these images are failing to convert to PNG/JPEG. Would have to dig in further to see why.
@qjhart @EricNebeker FYI
Is this really a solution though? In this case we have an original image that is not IIIF able, but it still is the original image. Changing to 8bit would degrade the original image. I wonder if it's better to detect that, (which we must do for the failed resolution size) and say, we can't modify that image for download?
Isn't that what clientMediaDownload is for? It would not provide the full 16bit color image via the UI, but would allow for all download options and the original version would still be in the dams.
Otherwise we are going to need to add functionality to detect image bit depth so we can toggle UI components.
@jrmerz I have the original images, the tiffs in the case, as the clientMediaDownload now and smaller jpgs as the client media for the UI.
PNG and JPG downloads fail for "Greene, Henry Dart Papers" collection items (native tiffs work fine). Triggers a “Failed — server problem” error.
Example item: https://digital.ucdavis.edu/collection/greene-papers/D-192/D192_6_073