-
Notifications
You must be signed in to change notification settings - Fork 97
feat: introduce alias for thumbnail max dimensions and change default #1297
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
base: main
Are you sure you want to change the base?
Conversation
|
@dragonchaser any comments about the var naming? "dimension" sounds like you wouldn't provide a number but a complete resolution as string (e.g. 9000x9000). But I don't have a better var name... |
|
@dragonchaser I'd say it even makes sense to deprecate the max width and max height var names... but no idea how to do that. Do you agree? And if yes, could you help me with it? Makes sense I write a proposal. |
Yes right, but I have no alternative proposal. |
| DataEndpoint string `yaml:"data_endpoint" env:"THUMBNAILS_DATA_ENDPOINT" desc:"The HTTP endpoint where the actual thumbnail file can be downloaded." introductionVersion:"1.0.0"` | ||
| MaxInputWidth int `yaml:"max_input_width" env:"THUMBNAILS_MAX_INPUT_WIDTH" desc:"The maximum width of an input image which is being processed." introductionVersion:"1.0.0"` | ||
| MaxInputHeight int `yaml:"max_input_height" env:"THUMBNAILS_MAX_INPUT_HEIGHT" desc:"The maximum height of an input image which is being processed." introductionVersion:"1.0.0"` | ||
| MaxInputWidth int `yaml:"max_input_width" env:"THUMBNAILS_MAX_INPUT_WIDTH;THUMBNAILS_MAX_INPUT_DIMENSION" desc:"The maximum width of an input image which is being processed." introductionVersion:"1.0.0"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| MaxInputWidth int `yaml:"max_input_width" env:"THUMBNAILS_MAX_INPUT_WIDTH;THUMBNAILS_MAX_INPUT_DIMENSION" desc:"The maximum width of an input image which is being processed." introductionVersion:"1.0.0"` | |
| MaxInputWidth int `yaml:"max_input_width" env:"THUMBNAILS_MAX_INPUT_WIDTH" desc:"The maximum width of an input image which is being processed." introductionVersion:"1.0.0" deprecationVersion:"%%NEXT%%"` |
| MaxInputWidth int `yaml:"max_input_width" env:"THUMBNAILS_MAX_INPUT_WIDTH" desc:"The maximum width of an input image which is being processed." introductionVersion:"1.0.0"` | ||
| MaxInputHeight int `yaml:"max_input_height" env:"THUMBNAILS_MAX_INPUT_HEIGHT" desc:"The maximum height of an input image which is being processed." introductionVersion:"1.0.0"` | ||
| MaxInputWidth int `yaml:"max_input_width" env:"THUMBNAILS_MAX_INPUT_WIDTH;THUMBNAILS_MAX_INPUT_DIMENSION" desc:"The maximum width of an input image which is being processed." introductionVersion:"1.0.0"` | ||
| MaxInputHeight int `yaml:"max_input_height" env:"THUMBNAILS_MAX_INPUT_HEIGHT;THUMBNAILS_MAX_INPUT_DIMENSION" desc:"The maximum height of an input image which is being processed." introductionVersion:"1.0.0"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| MaxInputHeight int `yaml:"max_input_height" env:"THUMBNAILS_MAX_INPUT_HEIGHT;THUMBNAILS_MAX_INPUT_DIMENSION" desc:"The maximum height of an input image which is being processed." introductionVersion:"1.0.0"` | |
| MaxInputHeight int `yaml:"max_input_height" env:"THUMBNAILS_MAX_INPUT_HEIGHT" desc:"The maximum height of an input image which is being processed." introductionVersion:"1.0.0" deprecationVersion:"%%NEXT%%"` | |
| MaxInputSideLength int `yaml:"max_input_side_length" env:"THUMBNAILS_MAX_INPUT_SIDE_LENGTH" desc:"The maximum side length of an input image which is being processed." introductionVersion:"%%NEXT%%"` |
| DataEndpoint: "http://127.0.0.1:9186/thumbnails/data", | ||
| MaxInputWidth: 7680, | ||
| MaxInputHeight: 7680, | ||
| MaxInputWidth: 10000, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| MaxInputWidth: 10000, |
| MaxInputWidth: 7680, | ||
| MaxInputHeight: 7680, | ||
| MaxInputWidth: 10000, | ||
| MaxInputHeight: 10000, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| MaxInputHeight: 10000, | |
| MaxInputSideLength: 10000, |
|
Unfortunately this needs more refactoring and rewriting of the values to the actual variables (I suggest if deprecated values are set to use the larger one). |
|
IHMO it would make more sense to have a env variable that limits the megapixel e.G maxInputMegaPixels and default to 50. By that we don't need to care about aspect ratio and so on |
Description
Introduced an alias for the thumbnailer max dimensions, because setting max height and max width separately makes no sense at all. Photos in portrait and landscape orientation exist. Makes no sense to have a different max height than max width.
Also adjusted the default value, because 7680px is not enough for a 50MP photo.
Motivation and Context
Types of changes