sul-dlss / riiif

IIIF image server in ruby

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Q: asking for max width but not height

jrochkind opened this issue · comments

I want to ask riiif server for an image, where the width is scaled to no more than X, and then the height is just scaled proportionally. I don't want to ask for both height and width.

Is there a way to do that?

A request like:

 http://localhost:3000/image-service/rx913p88g%2Ffiles%2Fa30e2371-2f8b-44bd-ab91-77a1d7fbb42f/full/!500,/0/default.jpg

Gives me an HTTP 400, with not much to go by in the logs. The logs have Unpermitted parameters: model, id, but I think that's unrelated.

Asking for something like:

 http://localhost:3000/image-service/rx913p88g%2Ffiles%2Fa30e2371-2f8b-44bd-ab91-77a1d7fbb42f/full/!500,500/0/default.jpg

Gives me a proper 200 with an image, but that's not asking for what I want anymore.

I guess I can just leave the ! off, maybe that does what I want? I'm confused with what these do.

Yep, I get it more now.