Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

custom image format suffix (support invalid iiif manifests) #226

Closed
litttley opened this issue Jan 29, 2024 · 3 comments
Closed

custom image format suffix (support invalid iiif manifests) #226

litttley opened this issue Jan 29, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@litttley
Copy link

litttley commented Jan 29, 2024

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

@lovasoa
Copy link
Owner

lovasoa commented Jan 29, 2024

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
     }
  ]
}

@lovasoa
Copy link
Owner

lovasoa commented Jan 29, 2024

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.

@lovasoa lovasoa changed the title custom image format suffix custom image format suffix (support invalid iiif manifests) Jan 29, 2024
@lovasoa lovasoa added the enhancement New feature or request label Jan 29, 2024
@litttley
Copy link
Author

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

@lovasoa lovasoa closed this as completed Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants