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

fix image downscaling #4567

Merged
merged 1 commit into from
Feb 23, 2022
Merged

fix image downscaling #4567

merged 1 commit into from
Feb 23, 2022

Conversation

ebbit1q
Copy link
Member

@ebbit1q ebbit1q commented Feb 8, 2022

Related Ticket(s)

Short roundup of the initial problem

the image was cleared instead of downscaled

What will change with this Pull Request?

  • just make a new buffer instead of clearing it

the default size of the database is not 0xfffff but rather 0xffff, on rooster ranges this limit is increased to 0xffffff.
these limits correspond with the sql blob and mediumblob field types, if we want servers to accept the image size we currently enforce on pictures by default we have three options:

  • create a smaller definition of profile images at 0xffff, meaning profile pictures will be smaller, we should consider more sophisticated downscaling code on the client side in this case
  • make a database migration changing the field from blob to medium blob by default, this is what is currently on rooster ranges
  • make a configurable limit that the server enforces, this would mean a protocol expansion to communicate the limit to clients

@ebbit1q
Copy link
Member Author

ebbit1q commented Feb 8, 2022

related #750

@ebbit1q ebbit1q merged commit 217dc09 into Cockatrice:master Feb 23, 2022
@ebbit1q ebbit1q deleted the fix_downscaling branch February 23, 2022 22:46
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.

profile picture downscaling does not work
2 participants