Types of original images in the digital collections
TIFF
Black and white colorspace
RGB colorspace
PDF
Diagnostics for derivative generation software
heroku run bash cd tmp PROFILE=`ls ../vendor/bundle/ruby/*/gems/kithe-*/lib/vendor/icc/sRGB2014.icc` wget https://digital.sciencehistory.org/downloads/m3zcuho -O b_w.tiff wget https://digital.sciencehistory.org/downloads/1h16b9n -O color.tiff wget https://digital.sciencehistory.org/downloads/519ucnx -O normal.pdf vips --version # Normal output: # vips-8.10.6-Tue Mar 23 20:52:58 UTC 2021 vipsthumbnail color.tiff --eprofile $PROFILE vipsthumbnail b_w.tiff --eprofile $PROFILE vipsthumbnail normal.pdf identify *.jpg | grep sRGB # Normal output (ignore warnings): # tn_b_w.jpg JPEG 128x108 128x108+0+0 8-bit sRGB 23603B 0.000u 0:00.000 # tn_color.jpg JPEG 128x96 128x96+0+0 8-bit sRGB 11880B 0.000u 0:00.000 # tn_normal.jpg JPEG 99x128 99x128+0+0 8-bit sRGB 1619B 0.010u 0:00.000
Software setups
# | Aptfile | Buildpack | Results |
---|---|---|---|
1 | mediainfo | heroku-community/apt https://github.com/machinio/heroku-buildpack-vips heroku/ruby |
TIFFS work |
2 | libvips-tools | heroku-community/apt heroku/ruby |
Color TIFFs work B&W TIFFs don’t work PDFs work |
3 | As in 2 | As in 2 |
All TIFFS work. Removing |
4 | mediainfo | heroku-community/apt |
|
5 | mediainfo | as in 4 | as in 4 |
6 | mediainfo | heroku-community/apt | as in 4 |
Note 1: Eddie believes option 1 did work for much of the evaluation period for Heroku, but as of summer 2021 it didn’t.
Note 2: Solution 3 is a band-aid; it violates the rule implicit in the code that all TIFF derivatives should have their derivatives encoded as
srgb
, including the derivatives of B&W originals. I interpret the documentation as meaning that the icc profile of originals is reused in their derivatives, but further research is needed.identify -verbose graphics_file.tiff | grep Colorspace
can be used to elucidate what happens to various types of original after being processed byvipsthumbnail
.