故宫博物院数字文物库的拼接图可使用dezoomify-rs下载:
1、下载安装dezoomify-rs
2、chrome浏览器打开书签管理,添加书签,书签名称:显示故宫参数,网址:javascript:document.getElementsByTagName(“body”).innerHTML = JSON.stringify(viewer.source.Image);
3、打开图片详情页,点击书签:显示故宫参数,会自动回去相应的参数,例如:{“xmlns”:”http://schemas.microsoft.com/deepzoom/2009","Url":"https://shuziwenwu-1259446244.cos.ap-beijing.myqcloud.com/relic/8243affd624b42eeb019b82565a95cd5/image-bundle/","Overlap":"1","TileSize":"510","Format":"png","Size":{"Width":"1742.0","Height":"4800.0"}}
4、根据获取的参数新建一个,例如,tu.dzi,按以下代码填入参数大致如下
替换相应的参数,如:width、height、url
如果图片宽度/高度超过65500,可更改保存的文件为xxx.png
dezoomify-rs -r 10 –accept-invalid-certs -H “User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36” -H “referer: https://www.dpm.org.cn" –dezoomer deepzoom “tu.dzi” “datu”%random%”.png”
一般情况,如果图片宽度/高度不超过65500
dezoomify-rs -r 10 –accept-invalid-certs -H “User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36” -H “referer: https://www.dpm.org.cn" –dezoomer deepzoom “tu.dzi”
回车后,会显示需要获取的图片大小。一般选择0 获取最大缩放级别
将tu.dzi放到dezoomify-rs所在的文件目录,终端运行上面命令
Comments