Skip to content

Conversation

@litttley
Copy link

Add zoom-format for #226

#[arg(short = 'c', long = "tile-cache")]
pub tile_storage_folder: Option<PathBuf>,
/// A zoom_level image format suffix eg.default.png or default.jpg
#[arg(short = 'f', long = "zoom-format", default_value = "auto")]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The type probably shouldn't be String if not all strings are valid. The documentation should explain precisely what this does.

tile_reference: TileReference,
mut tile_reference: TileReference,
) -> Result<Tile, TileDownloadError> {
if !"auto".eq(&self.zoom_format) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably not the right place to handle that. This option is specific to the iiif dezoomer, isn't it? If it is, then it should be handled in the dezoomer.

pub tile_storage_folder: Option<PathBuf>,
/// A zoom_level image format suffix eg.default.png or default.jpg
#[arg(short = 'f', long = "zoom-format", default_value = "auto")]
pub zoom_format: String,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the option is specific to IIIF, then its name should probably reference it.

Maybe something like --iiif-tile-format=jpg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants