custom image format suffix (support invalid iiif manifests)
litttley opened this issue · 3 comments
for example https://kokusho.nijl.ac.jp/api/iiif/200014063/v4/NIIP/WA3-0216/WA3-0216-00001.tif/1536,0,256,256/256,256/0/default.png
,it's can't work well for png,bug it is good for default.jpg
the info.json is https://kokusho.nijl.ac.jp/api/iiif/200014063/v4/NIIP/WA3-0216/WA3-0216-00001.tif/info.json
It looks like the iiif manifest you are mentioning is buggy. It explicitly mentions that the server supports png tiles:
{
"@context" : "http://iiif.io/api/image/2/context.json",
"protocol" : "http://iiif.io/api/image",
"width" : 5616,
"height" : 3744,
"sizes" : [
{ "width" : 175, "height" : 117 },
{ "width" : 351, "height" : 234 },
{ "width" : 702, "height" : 468 },
{ "width" : 1404, "height" : 936 },
{ "width" : 2808, "height" : 1872 }
],
"tiles" : [
{ "width" : 256, "height" : 256, "scaleFactors" : [ 1, 2, 4, 8, 16, 32 ] }
],
"@id" : "http://kokusho.nijl.ac.jp/api/iiif/200014063/v4/NIIP/WA3-0216/WA3-0216-00001.tif",
"profile" : [
"http://iiif.io/api/image/2/level1.json",
{ "formats" : [ "jpg", "png", "webp" ],
"qualities" : ["native","color","gray","bitonal"],
"supports" : ["regionByPct","regionSquare","sizeByForcedWh","sizeByWh","sizeAboveFull","sizeUpscaling","rotationBy90s","mirroring"],
"maxWidth" : 40000,
"maxHeight" : 40000
}
]
}
If you want a quick workaround, you should be able to simply download the json locally, update it to remove the incorrect tile format claims, and launch dezoomify-rs on the local updated file.
If you want a quick workaround, you should be able to simply download the json locally, update it to remove the incorrect tile format claims, and launch dezoomify-rs on the local updated file.
thanks for reminding me, it's really better to use local json file