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

feat: blurhash of image files #353

Open
insertish opened this issue Mar 29, 2024 · 7 comments
Open

feat: blurhash of image files #353

insertish opened this issue Mar 29, 2024 · 7 comments
Labels
crate:services:autumn crates/services/autumn enhancement New feature or request good first issue Good for newcomers

Comments

@insertish
Copy link
Member

No description provided.

@insertish insertish added enhancement New feature or request good first issue Good for newcomers labels Mar 29, 2024
@legoraft
Copy link

How would you like to see this implemented? There are crates that implement the blurhash algorithm, which can just be used as a crate to add a field to an image. How would this need to be implemented?

@insertish insertish transferred this issue from revoltchat/autumn Sep 29, 2024
@insertish insertish transferred this issue from revoltchat/backend Sep 29, 2024
@insertish insertish transferred this issue from revoltchat/self-hosted Sep 29, 2024
@insertish insertish added the crate:services:autumn crates/services/autumn label Sep 29, 2024
@insertish
Copy link
Member Author

Just need an extra field on the FileHash object that includes the hash, that can be included&served to clients

@TheRockettek
Copy link

I would recommend using thumbhash as an alternative to blurhash as blurhash does not have transparency support.
https://github.com/evanw/thumbhash

@legoraft
Copy link

I would recommend using thumbhash as an alternative to blurhash as blurhash does not have transparency support. https://github.com/evanw/thumbhash

It seems like the project isn't maintained very actively, so I don't know if it is smart to use.

@legoraft
Copy link

Just need an extra field on the FileHash object that includes the hash, that can be included&served to clients

Could it be smarter to include a blurhash field to the Image struct within the metadata of a file? This can be implemented in the generate_metadata() field within autumn. Something like blurhash-rs could be used, together with the generated width and height. Would this implementation be correct?

@TheRockettek
Copy link

Discord and presumably many other companies are activly using this implementation (see https://github.com/discord/lilliput/blob/master/thumbhash.cpp). The same about active maintaining could be said about blurhash too. Having to use blurhash also means extra information such as width and height will have to be stored instead of just using a single string.

It is an implementation that really does not need much maintainence once implemented as what is going to change?

I would recommend using thumbhash as an alternative to blurhash as blurhash does not have transparency support. https://github.com/evanw/thumbhash

It seems like the project isn't maintained very actively, so I don't know if it is smart to use.

@legoraft
Copy link

Discord and presumably many other companies are activly using this implementation (see https://github.com/discord/lilliput/blob/master/thumbhash.cpp). The same about active maintaining could be said about blurhash too. Having to use blurhash also means extra information such as width and height will have to be stored instead of just using a single string.

It is an implementation that really does not need much maintainence once implemented as what is going to change?

I would recommend using thumbhash as an alternative to blurhash as blurhash does not have transparency support. https://github.com/evanw/thumbhash

It seems like the project isn't maintained very actively, so I don't know if it is smart to use.

Wasn't aware of that. Width and height are already stored in revolt, though (see file_hashes). I would say that the final choice is up to insert.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crate:services:autumn crates/services/autumn enhancement New feature or request good first issue Good for newcomers
Projects
Status: 🕒 Backlog
Development

No branches or pull requests

3 participants