-
Notifications
You must be signed in to change notification settings - Fork 385
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
Refactor documentation for content/media repository #2068
Conversation
Note: this merges the Edit: Or not, because the JSON validator hates that idea. |
Apparently you can't have an optional path parameter.
The *desired* width of the thumbnail. The actual thumbnail may not | ||
match the size specified. | ||
The *desired* width of the thumbnail. The actual thumbnail may be | ||
larger than the size specified. |
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.
Do we want to make it illegal to send a smaller size? If we have a thumbnail that is very slightly smaller than requested and one that is much larger, it doesn't seem like it would be unreasonable for the server to decide to send the smaller one.
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.
We do want to make it illegal - this is covered in the thumbnails section to avoid having the requirement in multiple places.
The rationale being the last paragraph of #2060 (comment)
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.
Hmm - so the justification there is that the server will return an image that's a little too small and the client will have to upscale, but, in riot-web at least, if the server returned a version that was too big we'd have to downscale which can still end up introducing artefacts. I thought the intended solution to this was to spec the list of standard sizes a client can request so it can ask for one of them in the knowledge that it ought to get what it asks for.
ICBW but I do seem to remember it being fairly deliberate that servers could return slightly smaller versions as well as slightly larger.
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.
@ara4n seems to be the other person with strong opinions here, so pinging to drag him into this. Not sure who else has the context on this problem, but would recommend dragging them in as well.
Goal for this PR is to spec safe assumptions clients can make. I do want to avoid sliding into the position of leaving the spec vague and ignoring the problem though.
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.
the artefacts from upscaling should always be worse than the artefacts from downscaling, given in upscaling we're trying to interpolate data which otherwise isn't there, whereas downscaling we should be able to get stuff which is at least as good quality.
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.
If the original image is smaller than the requested thumbnail size, then do we want the server to upscale the image, or just send the original image?
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.
If the original image is smaller than the requested thumbnail size, then do we want the server to upscale the image, or just send the original image?
Send the original image, otherwise the server makes the image useless to everyone.
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.
OK - fair enough if we're sure.
event-schemas/schema/core-event-schema/msgtype_infos/image_info.yaml
Outdated
Show resolved
Hide resolved
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.
Thanks :)
Fixes #2060
Fixes #772
Fixes #888