{"id":2528,"date":"2022-03-31T23:42:10","date_gmt":"2022-03-31T21:42:10","guid":{"rendered":"https:\/\/blog.subcaelo.net\/ensis\/?p=2528"},"modified":"2022-03-31T23:42:10","modified_gmt":"2022-03-31T21:42:10","slug":"high-res-images-from-gallica","status":"publish","type":"post","link":"https:\/\/blog.subcaelo.net\/ensis\/high-res-images-from-gallica\/","title":{"rendered":"High-res images from Gallica"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><a rel=\"noreferrer noopener\" href=\"https:\/\/gallica.bnf.fr\/\" target=\"_blank\">Gallica<\/a> is the digital branch of the French National Library. It hosts the scans of a lot of rare old books, as well as of unique manuscripts. Many precious direct HEMA sources can be found there, for example:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a rel=\"noreferrer noopener\" href=\"https:\/\/gallica.bnf.fr\/ark:\/12148\/btv1b525110413\" target=\"_blank\">Lovino<\/a><\/li><li><a rel=\"noreferrer noopener\" href=\"https:\/\/gallica.bnf.fr\/ark:\/12148\/bpt6k1520818c\" target=\"_blank\">Sainct-Didier<\/a><\/li><li><a rel=\"noreferrer noopener\" href=\"https:\/\/gallica.bnf.fr\/ark:\/12148\/bpt6k1518476n\" target=\"_blank\">Ghisliero<\/a><\/li><li><a rel=\"noreferrer noopener\" href=\"https:\/\/gallica.bnf.fr\/ark:\/12148\/btv1b8606994k\" target=\"_blank\">Liancour<\/a><\/li><li><a rel=\"noreferrer noopener\" href=\"https:\/\/gallica.bnf.fr\/ark:\/12148\/bpt6k229941w\" target=\"_blank\">Girard<\/a><\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">It also gives access to a wealth of secondary sources.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Gallica has a specificity which can be a bit of a bother. If you use the zoom tool, you can see a lot of details, but when you try to save a particular page, your choice is between a (relatively) low-resolution export, or a high-resolution portion of the page. There just isn&#8217;t an apparent way to save the full high-resolution scan of a page. Obviously neither option really cut it if what you need is the actual full-resolution scan, for example to do a nice print or for further off-line study.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, there is a way to get around that issue and access the full scan. Gallica implements the <a rel=\"noreferrer noopener\" href=\"https:\/\/iiif.io\/\" target=\"_blank\">IIIF<\/a> (International Image Interoperability Framework) interface. With a bit of URL trickery, this can solve the problem.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Let&#8217;s say you want to get that <a rel=\"noreferrer noopener\" href=\"https:\/\/gallica.bnf.fr\/ark:\/12148\/btv1b525110413\/f31.item\" target=\"_blank\">nice Lovino plate<\/a>. If you look in the address bar of your browser, you will see this URL:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><kbd>https:\/\/gallica.bnf.fr\/ark:\/12148\/btv1b525110413\/f31.item<\/kbd><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now let us modify this URL like so. First remove the .item part to keep only the folio (on some documents or viewing modes, you might have to remove more, or different words; what you really need is to trim it down to the page &#8216;name&#8217;):<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><kbd>https:\/\/gallica.bnf.fr\/ark:\/12148\/btv1b525110413\/f31<s>.item<\/s><\/kbd><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">And then add a few parts:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><kbd>https:\/\/gallica.bnf.fr\/<strong><span class=\"has-inline-color has-vivid-red-color\">iiif\/<\/span><\/strong>ark:\/12148\/btv1b525110413\/f31<strong><span class=\"has-inline-color has-vivid-red-color\">\/full\/full\/0\/native.jpg<\/span><\/strong><\/kbd><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The <kbd>iiif<\/kbd> means we want to access Gallica&#8217;s IIIF service, the first <kbd>full<\/kbd> means to get the full page, the second <kbd>full<\/kbd> means to get the full resolution, the <kbd>0<\/kbd> means no rotation, and finally <kbd>native.jpg<\/kbd> asks for the original quality in JPEG format.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This should give you access to the <a rel=\"noreferrer noopener\" href=\"https:\/\/gallica.bnf.fr\/iiif\/ark:\/12148\/btv1b525110413\/f31\/full\/full\/0\/native.jpg\" target=\"_blank\">full-resolution color scan<\/a> in all its glory! As you can see below, it is significantly better than the default Gallica export, which more or less corresponds to <a rel=\"noreferrer noopener\" href=\"https:\/\/gallica.bnf.fr\/iiif\/ark:\/12148\/btv1b525110413\/f31\/full\/1024,1335\/0\/native.jpg\" target=\"_blank\">that IIIF request<\/a> instead (even worse because they seem to do some color processing on top of it).<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><a href=\"https:\/\/blog.subcaelo.net\/ensis\/wp-content\/uploads\/2022\/03\/sideBySideLovinof31.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"648\" height=\"366\" src=\"https:\/\/blog.subcaelo.net\/ensis\/wp-content\/uploads\/2022\/03\/sideBySideLovinof31.jpg\" alt=\"\" class=\"wp-image-2538\" srcset=\"https:\/\/blog.subcaelo.net\/ensis\/wp-content\/uploads\/2022\/03\/sideBySideLovinof31.jpg 648w, https:\/\/blog.subcaelo.net\/ensis\/wp-content\/uploads\/2022\/03\/sideBySideLovinof31-300x169.jpg 300w, https:\/\/blog.subcaelo.net\/ensis\/wp-content\/uploads\/2022\/03\/sideBySideLovinof31-460x260.jpg 460w\" sizes=\"auto, (max-width: 648px) 100vw, 648px\" \/><\/a><figcaption>A detail of folio 31 in Lovino. On the left, the page saved via Gallica&#8217;s standard interface, on the right, the full resolution.<\/figcaption><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">It might seem like a bit of a hack to use such a trick, but rest assured that it is perfectly within the bounds of the normal use of the service. It is even <a rel=\"noreferrer noopener\" href=\"https:\/\/api.bnf.fr\/fr\/api-iiif-de-recuperation-des-images-de-gallica\" target=\"_blank\">officially documented<\/a>. However, be sure to comply still with the terms of use of the document, and perhaps limit such accesses to the minimum needed to avoid overloading the servers with data.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Gallica is not the only digital library with IIIF access, here are <a rel=\"noreferrer noopener\" href=\"https:\/\/iiif.biblissima.fr\/collections\/\" target=\"_blank\">some more examples<\/a>. Presumably you could apply the same sort of trick to get full-resolution scans there too, if their public interface has the same limitations as Gallica.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Gallica, the digital section of the French National Library, hosts a lot of sources. Here is how to download full-res scans from there.<\/p>\n","protected":false},"author":2,"featured_media":2538,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[17,63,88,127],"class_list":["post-2528","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-source","tag-bnf","tag-gallica","tag-library","tag-scans"],"_links":{"self":[{"href":"https:\/\/blog.subcaelo.net\/ensis\/wp-json\/wp\/v2\/posts\/2528","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.subcaelo.net\/ensis\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.subcaelo.net\/ensis\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.subcaelo.net\/ensis\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.subcaelo.net\/ensis\/wp-json\/wp\/v2\/comments?post=2528"}],"version-history":[{"count":0,"href":"https:\/\/blog.subcaelo.net\/ensis\/wp-json\/wp\/v2\/posts\/2528\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.subcaelo.net\/ensis\/wp-json\/wp\/v2\/media\/2538"}],"wp:attachment":[{"href":"https:\/\/blog.subcaelo.net\/ensis\/wp-json\/wp\/v2\/media?parent=2528"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.subcaelo.net\/ensis\/wp-json\/wp\/v2\/categories?post=2528"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.subcaelo.net\/ensis\/wp-json\/wp\/v2\/tags?post=2528"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}