lovasoa / dezoomify-rs

Zoomable image downloader for Google Arts & Culture, Zoomify, IIIF, and others
https://dezoomify-rs.ophir.dev
GNU General Public License v3.0
719 stars 65 forks source link

SecondCanvas support #19

Closed MrChrisWin closed 4 years ago

MrChrisWin commented 4 years ago

I'm trying to download from https://www.museothyssen.org/en/collection/artists/caravaggio-michelangelo-merisi/saint-catherine-alexandria. The page uses SecondCanvas technology which appears to have a demo at https://github.com/gdmec07131005/SecondCanvasDemo/tree/master/SecondCanvasDemo/SecondCanvasDemo. Is it possible to add this to dezoomify? Thank you.

lovasoa commented 4 years ago

You don't need dezoomify or any similar tool to download these images. They are not tiled, the full image is present on the page. When on the viewer page, just right-click on the image while pressing shift, and click Save Image As.

In your example above, the URL of the image is :

https://imagenes.museothyssen.org/sites/default/files/imagen/2019-09/CARAVAGGIO_Santa%20Catalina%20de%20Alejandr%C3%ADa_81%20%281934.37%29_FOTOH_%23DespuesRest.jpg

canvas

MrChrisWin commented 4 years ago

Yes they do have an option to download low-res image. But they also have shown the View Gigapixel image which has a json https://sc4hvcfl151058502cff46683.s3.amazonaws.com/web/index.html?js=4w936q913z0t2j229091702054fe1f1/a4ahhg1810349924254069d_en.json. It seems to have infinite zoom.

lovasoa commented 4 years ago

Oh, I see, sorry for closing this too fast. I'm adding an "enhancement" label, and I'll look into it if I find the time.

lovasoa commented 4 years ago

Looking at the tile URLs, it must be possible to just use the generic dezoomer.

MrChrisWin commented 4 years ago

the web version returns this for generic dezoomer: Error Uncaught Error: Unable to load tile. Check that your internet connection is working and that you can access this url: https://sc4hvcfl151058502cff46683.s3.amazonaws.com/web/index.html?js=4w936q913z0t2j229091702054fe1f1/a4ahhg1810349924254069d_en.json

(https://ophir.alwaysdata.net/dezoomify/zoommanager.js:191) You should read our Frequently Asked Questions, and, if you think this is an issue with dezoomify itself, report a bug on the bugtracker.

MrChrisWin commented 4 years ago

Interestingly, under Inspect in Chrome it shows various director. When I zoom in more, it generates more jpg files. Capture

lovasoa commented 4 years ago

You can read our documentation about how to use the generic dezoomer.

Here is an example, for the 5th zoom level of your image: https://ophir.alwaysdata.net/dezoomify/dezoomify.html#https://sc4hvcfl151058502cff46683.s3.amazonaws.com/gigapixel/Thyssen_SantaCatalinaDeAlejandria_Caravaggio/img_Thyssen_SantaCatalinaDeAlejandria_Caravaggio_5_{{X}}_{{Y}}.jpg

MrChrisWin commented 4 years ago

OK I'll give it a try.

lovasoa commented 4 years ago

I downloaded the 7th zoom level with dezoomify-rs :

dezoomify-rs --retries 2 --retry-delay 5s "https://sc4hvcfl151058502cff46683.s3.amazonaws.com/gigapixel/Thyssen_SantaCatalinaDeAlejandria_Caravaggio/img_Thyssen_SantaCatalinaDeAlejandria_Caravaggio_7_{{X}}_{{Y}}.jpg"

And I uploaded it to wikimedia: http://commons.wikimedia.org/wiki/File:Saint_Catherine_of_Alexandria_(Caravaggio).jpg

MrChrisWin commented 4 years ago

Thank you.