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

Add zoom-format #227

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add zoom-format #227

wants to merge 1 commit into from

Conversation

litttley
Copy link

Add zoom-format for #226

@@ -116,6 +116,9 @@ pub struct Arguments {
/// retrying partially failed downloads, or stitching the tiles with an external program.
#[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.

) -> 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.

@@ -116,6 +116,9 @@ pub struct Arguments {
/// retrying partially failed downloads, or stitching the tiles with an external program.
#[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")]
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